combo box query/report

velma_b

New Member
Joined
Dec 2, 2003
Messages
30
I have a query with a field called "employee" ("employee" is a combo box listing 30 employees).
[which employee] is the "criteria" entry.
This works fine on the report (I am asked [which employee] when I ask the report to print), but is there a way to get the actual combo box to pop up instead of the [which employee] parameter?

Thanks for your help.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Create a form.

Create a combo box that selects the employees from your table source.

Create a command button that will run your report.

In your employee field replace the criteria with the following:
[forms]![Enter From Name Here]![Enter Combo Box Name here]

This should do the trick... (y)
 
Upvote 0
I typed the criteria on my query as you said, but now I'm I'm being prompted for "Forms!name of my combo box" instead of [which employee?]. I don't want to have to type the name of the person, just want to be able to click on their name (typing it exactly as it appears in the table is the problem).

I do have an existing form with the combo box and a command button for printing the report.

Thanks for your help - I really appreciate it.
 
Upvote 0
The problem may be with what you wrote in the criteria...

[forms]![Enter Form Name Here]![Enter Combo Box Name here]

Keep the brackets, just substitude the text. Leave alone the first part where is says "form". then enter the form name, to find out the combo box name, right click on it and is should pop up...something like combobox1.

Let me know if it works,

But remember, you have to have the form open, choose the item from the combo box and don't forget you have to create a command button on the form to run your report. When you get all these things you'll be surprised how easy it is.
 
Upvote 0
o.k., apparently I'm putting something in the wrong place. This is what I have:

I have an existing form [timeliness] with a combo box [namebox] listing 30 employees.
I have a query for a report [timeliness query] with the following criteria for the “name of employee” field:
[forms]![timeliness]![namebox]
I have an existing report [timeliness report] created with the wizard, based on the [timeliness query].
I have another existing form [main page] with a “print timeliness report” command button.

On the “main page” form, when I click on the “print timeliness report” command button, it is prompting me to type the employee’s name. My goal is to be able to have the combo box appear and just click on the name - not type it. I tried copying the combo box to the "main page form", but the command button still prompts me to type the name.

Thanks again for your help. As you can tell, I need all the assistance I can get!!!
 
Upvote 0
Add the Employee ID field to the query and use that for the criteria. My guess is that the Combo is using the ID, especially if you built it using the Wizard.

Denis
 
Upvote 0

Forum statistics

Threads
1,221,596
Messages
6,160,716
Members
451,665
Latest member
PierreF

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top