If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date query in Dialog box question
Hello,
I want to have a parameter query to search by date----"from date" and "to date".Is there some default expression that i can use as a criteria instead of typing a date so when the query is run and the dialog appears, the user would be prompted to enter the "from date" "to date".Is there something like 00/00/2004 thru 00/00/2004? Thanks |
#2
|
|||
|
|||
Date query in Dialog box question
On Fri, 4 Jun 2004 15:11:02 -0700, joe
wrote: Hello, I want to have a parameter query to search by date----"from date" and "to date".Is there some default expression that i can use as a criteria instead of typing a date so when the query is run and the dialog appears, the user would be prompted to enter the "from date" "to date".Is there something like 00/00/2004 thru 00/00/2004? Thanks I'd suggest using a small Form (frmCrit let's call it) with two textboxes, txtFrom and txtTo. You can set the Default properties of these two controls - say, if you want to have the default be "year to date", you could set the default property of txtFrom to =DateSerial(Year(Date()), 1, 1) and txtTo to Date(). Your query would then use = Forms!frmCrit!txtFrom AND = Forms!frmCrit!txtTo as a criterion on the date field. The simpler [Enter date:] parameter queries don't support defaults, at least not in a user-friendly manner. John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public |
Thread Tools | |
Display Modes | |
|
|