LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default Change Excel query with a inputbox

You want to use a parameter for the date. You can only use parameters
in Query, not in the Query Wizard.

instead of: WHERE (ae_dt1.field4='2008-05-02')
try: WHERE (ae_dt1.field4=?)
Excel should prompt the user for the criteria value (parameter).

To create a parameter in the msquery interface, use square brackets
(with or without a default) as the value for the date field criteria.
To create a parameter in the sql statment, substitute a question mark
for the date value.

Cliff Edwards
 
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
InputBox Query Noemi Excel Programming 4 June 4th 06 11:52 PM
Change font size in Msgbox or Inputbox Excelerate-nl Excel Programming 2 May 11th 06 12:08 PM
Using InputBox to get desired date for a Query pulling data from Access into Excel cbeebe[_6_] Excel Programming 0 November 4th 04 09:30 PM
Using InputBox to get desired date for a Query pulling data from Access into Excel cbeebe[_5_] Excel Programming 1 November 4th 04 08:23 PM
Using InputBox to change query criteria in Access JohnBoy Excel Programming 2 September 16th 03 02:08 PM


All times are GMT +1. The time now is 01:34 AM.

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

About Us

"It's about Microsoft Excel"