Confuse-a-Tez

Tezcatlipoca

Registered User.
Local time
Today, 04:59
Joined
Mar 13, 2003
Messages
246
Right, I'm a little bemused by something which is happening in my database following the addition of a new function.

Essentially, I work in the education sector, and have a large database filled with student details. A lot of our students are foreign, and so stay with host families whilst in this country.

I recently decided to add a function whereby I could instantly produce an alphabetical list of all our thirty of so host families, which also gave the details of each student currently with them, and of each student booked with them for the future; the whole to be displayed as a report. This part works great.

I then added a new form to my database (form2), created an unbound text box (nowdate) and added a button that runs a query. The query has Between [Forms]![Form2]![nowdate] And #30/12/09# in the criteria section of the Course End field. By this method, I filter out all the courses which are irrelevant (i.e. those that had already finished prior to the date of the report being produced).

Now everything runs smoothly expect for one tiny effect: I go to my newly created user form - Form2 - from my switchbard, and punch in the current date to the text box. When I click the button to produce the report an 'enter Parameter Value' box flashes up, requesting the 'nowdate'. I can easily enter the date again, and the report filters everything properly, but I shouldn't really have to.

Sooooo, my question is, why isn't the data entered into the unbound text box on my user form being picked up and used by my query?
 
Last edited:
i feel the syntax for the parameter is incorrect but cant for the life of me remember what the correct one is. Maybe try taking the [] off the Forms! ie
Forms![Form2]![nowdate]
I think the query may be looking for a field or form called Form
HTH
Dave
 
You may be right on the syntax front, but I can't for the life of me see how it should be presented.

I tried your advice, same problem I'm afraid... :rolleyes:
 
Hi,

If all the user does is enter todays date into the textbox for the purpose of the query, can you not omit this and then change your query to

between date() and #30/12/09#

This should get around the problem and cut down on what the user has to do manually.
 
Thanks. No idea why my original query string was going wrong, but the new one works fine now. :D
 

Users who are viewing this thread

Back
Top Bottom