query criteria from text box in form

Spelthorne1

Registered User.
Local time
Today, 13:00
Joined
Feb 17, 2004
Messages
20
Have set up a db that contains the date when data was inputted such as 16/02/2004.

Having this, we require a query that can grab all records between certain dates. But the problem is, we want to type in the appropriate dates in a text box on a form where a button will be pressed and a new table will be created.

Is it possible to allow the 'criteria' to take text from the text boxes?

Eg; between #15/02/2004# And #16/02/2004#
Instead of the dates, we want

'between form1.txtbox1.text and form1.txtbox2.text'

Thanks,
If this doesnt make any sense, i'll try and word it better!!
 
Spelthorne1 said:
between form1.txtbox1.text and form1.txtbox2.text

Almost there:

Between [Forms]![Form1]![txtbox1] And [Forms]![Form1]![txtbox2]
 
You might want to have a look at searching for one of my calendar examples - nice for setting date ranges. :cool:
 
Thanks,

Ive copied

Between [Forms]![Form1]![txtbox1] And [Forms]![Form1]![txtbox2]

into the criteria box but nothing happens? I just get a blank table with no data in it.
Any suggestions?
 
Is your form actually named "form1" and your textboxes actually named "txtbox1" and "txtbox2"?
 
yep!

Im working on a test database before calling them properly!
 

Users who are viewing this thread

Back
Top Bottom