gbnorton
asked on
run a query from a command button with criteria
I have a query I would like to run from a command button. I would like to include the criteria for the date_run field.
In English it would look like this:
Run qryGlassing_Schedule where date_run = #2/16/2011#.
Thanks,
Brooks
In English it would look like this:
Run qryGlassing_Schedule where date_run = #2/16/2011#.
Thanks,
Brooks
If the Date is somewhere on the form, or is today's date then in the criteria field of the query - right mouse click - build and point the where you want to get the date field from.
If you want to click the button and have the program prompt for the info then just use the [enter date] in the criteria field of the query
If you want to click the button and have the program prompt for the info then just use the [enter date] in the criteria field of the query
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect!
Thanks again.
Thanks again.
Thanks, glad to help.
SELECT Table1.*
FROM Table1
WHERE (((Table1.date_run)=[Enter
Private Sub btnOpenQry_Click()
DoCmd.OpenQuery "qryGlassing_Schedule ",acViewNormal
End Sub
You will get a prompt to enter the date. Is this what you mean?
mx