Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Macro Creating a variable which is to be used in a SQL in the Mac

Created a variable by using an input box

eg. StartDate = InputBox("Enter Start Date?", "Report")

Then used this variable in the where clause of the SQL statemnt in the Macro

eg Date StartDate

Instead of using the variable it tried to put StartDate in the query instead.

How do i make the statement to look at the variable.

Should the format be in a datetime format as well since this field in the
database is of datetime format. How do i then change the variable to a
datetime format

Thanks to anyone who can help
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a variable Abe New Users to Excel 1 April 15th 06 06:41 AM
Macro Creating Variable and using variable in a SQL statement Jimmy Excel Programming 4 October 25th 04 02:36 AM
Macro Creating a variable which is to be used in a SQL in the Mac Jimmy Excel Programming 0 October 25th 04 01:21 AM
Macro Creating a variable which is to be used in a SQL in the Mac Jimmy Excel Programming 1 October 24th 04 11:22 AM
creating macro to ask for variable info when excel starts Flyriverside Excel Programming 1 April 7th 04 06:32 PM


All times are GMT +1. The time now is 11:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"