Can you reference a form to set the criteria for a report?? (1 Viewer)

C

ConB

Guest
I have a report that prints production scrap for that sorts by Client- There are about 15 different clients and I would like to allow the user to limit it to 1 client but in order to do that they would have to type it exactly how I have it in the back end - which is very unlikely to happen -resulting in an empty report!

Is there a way I could reference a form w/ a drop down or use something similar to "like([enter client:])"

Any help is greatly appreciated and thank you!
 

Chris RR

Registered User.
Local time
Today, 10:59
Joined
Mar 2, 2000
Messages
354
If you can create a query that will list all of the client names from your backend DB, you can build a combobox to show those names. That's what your users could pick from when they want the report.

Then either base your report on a (different) query that uses the combobox in its criteria, or run the report with a filter that uses the combobox.
 
C

ConB

Guest
I have the query working that selects the Client but I don't know how to set up the combo box - Does anyone have any suggestions?
 

ctaylor

Registered User.
Local time
Today, 16:59
Joined
Feb 13, 2001
Messages
18
create a PARAMETERS form with an unbound combo box, lets call these items something like "frmParameters" and "cboClientList"

Your final query should then should will then have [Forms]![frmParameters]![cboClientList] as the search criteria.

Bind your report to this query.

With regards to your question on how to bind a row source and column to a combo box, you could manually write the SQL to do this, but using the wizard that appears when you add a combo box to a form is the easiest way to do this. Just answer the questions and it will walk you right through everything you need to know. The easiest way to learn this is to use the wizard, then check the combo box properties until you learn how to manually control it.
 

Talismanic

Registered User.
Local time
Today, 16:59
Joined
May 25, 2000
Messages
377
Here is how to open a report with criteria using a combobox and a command button.

Open report based on multiple criteria

I also modified the code to check to see if there is relevent data in a report before opening it up.

So for instance if a estimator did not have any time posted in the table, a message box would alert the user instead of opeing a blank report. If you would like to see that part of the code let me know and I will cut and paste it here.

I don't have time right now to go into more detail about the code in the other thread but if you need more help with it let me know and I will write it out a little more clearly.



[This message has been edited by Talismanic (edited 02-27-2001).]
 

Users who are viewing this thread

Top Bottom