Defining Criteria in Form

Crispy

Registered User.
Local time
Today, 23:06
Joined
May 28, 2002
Messages
43
Hi all - I have a suite of reports which provide customer details. They all require the user to input the name of the customer.

The way it works is that I have a query which returns everything for the customer.

Then I have other queries based on the first query which bring back the specific information I want regarding the customer.

This works fine when the customer's name is entered using [Enter Customer Name] in the criteria of the relavant field in the first query.

However, because a user might want to run several different reports on the same customer it becomes a chore for them ot repeatedly have to enter the customer name.

My solution is to have an unbound field in the reports menu for the customer name and to use this as the criteria in the query, so it now reads [Forms]![FrmMenu]![Text42].

The first query runs fine, but the queries based on it are suddenly not returning any records.

There is undoubtedly a simple explanation for this but as I'm quite dim, I can't see it. Could somebody enlighten me and maybe even suggest a solution?
 
The form must be open and the control populated for the criterion to be picked up. Is the menu form closing after you run the first report?
 
Hi Neil - thanks for replying.

Yes, the form is open (it is not allowed to close while the db is open) and the control is populated.

I don't think that is the problem as the query (QryCustomer) that returns all information relating to the customer named in the textbox returns the correct number of records - it is the queries that are based upon QryCustomer that are returning no records.
 
Yes Sir

Not knowing how you Queries are buildt.

I would suggest useing Combo Box to choose the Customer.

And you have to let the other Queries know (So to speak) what Customer you are searching the information on.

I would need a little more information to tell how to do this.
 
Can't help but agree with ThreeCrow. Not enough info.
 

Users who are viewing this thread

Back
Top Bottom