Query picks up dates from Form...Doesn't work!

donnycarr

New member
Local time
Today, 22:41
Joined
Oct 5, 2001
Messages
8
I have many queries that 'should' pick up dates from a form. For some reason they don't want to pick up the dates I have entered into the text boxes on the form. All my references appear to be correct. My query criteria reads:
[forms]![date]![tb1]
'date' being the name of my form and 'tb1' being the name of my text box I want the query to pick up the date from.
..So I have my form open, I type the date 08/09/01 into tb1(text box 1) and then run my query. But, it comes up with no records. If I close the form and run the query again, its asks for a parameter for tb1. If you enter the same date again, it works, it comes up with the records I need.
Can you shed any light. I think it's got something to do with my form. In design view the text box says unbound. In form view its blank until you type in the date (I have an input mask - 00/00/00;0)

If ANYONE can help me with this it would be much appreciated.

....Donny
 
The word date in accesss is a reserved word, anything named date will cause you problems so you need to re-name your form. Secondly in order for the query to be able to reference the form the form has to remain open and your text box should have the format property set to date/time.
HTH
 
Tried manking those amendments.
I changed the name of the form to 'fill'.
I changed the format of the text box to 'Short Date' as there was no option for 'date/time' and I left the form open.
Still not coming up with anything..

...Donny
 
How are you opening the query, try using a command button. Although I very rarely open queries directly but prefer to use pop up forms to display the results. You might try defining the query parameters ie.Forms!Fill!tb1 Date/Time
 

Users who are viewing this thread

Back
Top Bottom