Query question with my button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form "input" with a command button "cmdPress" the command button
runs a query "qryRight" fields (Sheetdate"date field", name"Text field",
height"text field") anyway. In the criteria box on the "qryRight" for field
Sheetdate I have "Date()" When you press the button on the form the query
displays records only concerning the current system date, which works fine.
Here is the question: I want the user to be able to run this query as is
"""OR""" have the option of changing the date and inputting a different date.
Is this possible? I know I can put [Enter a Date] in the criteria field, but
I want the default alway to be the current system date. Please let me know if
this is possible, thank you.
 
Put a date/time format text box on your form next to the button that runs the
query and default it to todays date. Change the criteria in your query from
Date() to
[Forms]![input]![TextBoxName]
You can then leave the default date in the text box or change it to any
other date and your query will use that date.
 
Back
Top