Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modify query for me.requery 1

Status
Not open for further replies.

gsfmike

Programmer
Oct 20, 2000
21
0
0
US
I have a form based on a query where a date is being requested. It populates the form nicely. Currently the requery pops up the request from the query to enter a new date. Not very elegant.

I am trying to have a field on the form accept a new date and on the update event requery based on the new date.

I have tried to generate an sql string as the criteria for opening the form. NO LUCK! I want to update the query but am a loss with my current skill set.

If anyone has any suggestions, I would greatly appreciate it.
 
Hi

Say on your form you have a conttrol txtDate

Say your form is called frmMyForm

In your query, in the query designer, put a criteria on the date columns so:

Forms!frmMyForm!txtDate

you can type this into the query design grid, but there is also a builder wizard which will guide you through it

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Ken That was a wonderful solution. Took me a few tries but it works great. I had to create a new query however and the query added brackets to the criteria. Just for info only, any idea why the query could not be modified and work?

Thanks very much - you helped out tremendously.
 
Ken

Thanks for the help. That little piece of info has started the old wheels churning and has helped with many other forms.

Please ignore the previous question. It does not apply!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top