Query needs to refer to date on Form

AccessWimp

New member
Local time
Yesterday, 19:47
Joined
May 11, 2005
Messages
7
Hello - I have a form with a txtbox that shows a date. I need the querry to refer to that date as selection criteria. I have the following in the criteria of the query: =[forms]![frmUpdatePayments]![txtDate]. I know the problem is I need # at the beginning and at the end of the date, but how do I do that?
 
You actually don't neet the # at all, simply remove the = from your criteria. Place the line below on the query below the DateField you use to store your dates:
[forms]![frmUpdatePayments]![txtDate]

Your query should end up something like this:
"Select * From TablewithDates WHERE DateField = " & [forms]![frmUpdatePayments]![txtDate]
 

Users who are viewing this thread

Back
Top Bottom