Unbound form and selection boxes for report

fraser_lindsay

Access wannabe
Local time
Today, 19:25
Joined
Sep 7, 2005
Messages
218
I have set up a query to give me details of employees names, the business they work for and where they work.

If I run it without criteria I get all of my records, as you would expect.

However, I want to be able to select parameters from combo boxes and then run a specific report of employees by location. I did have this working by accident a while ago but have changed quite a lot since then.

I have set up an unbound form with three combo boxes - Business, Business Unit and Location. Then a button for preview and print report linking to my report template.

I have refernced the controls in the relevant columns of my query as: [Forms]![FormName]![Control].

When I run the query I get nothing back and I don't understand why.
 
Have you tried just using one criteria at a time?
 
Just tried and I get nothing for each one. Blank results.

Still don't know why.
 
Hum... You've got some real simple problem here.

Do your combo boxes have just 1 column?
 
I have them all set up as two columns, but the first column width is 0" to hide it.

The row source for each combo relates to their parent table i.e. business, business unit and location. All are two column tables Auto ID and Business etc.

F
 
You may have to do something like:

Forms!Customers!CompanyName.Column(1)
 
I have just followed this:

http://support.microsoft.com/kb/209261/EN-US

It is supposed to be able to show all records including null in a parameter query.

I have followed it by substituting my forms names etc and my query still comes up with no records despite selecting a location.

This is doing my head in. This should be so simple, yet I can't seem to manage it.
 
Did you try the column thing?

Can you get it to work if you use a text box instead of a combo box?
 
Ken,

Sorry, yes I tried the column thing, but no luck.

I have tried a text box as well but I get the same result - blank query. Maybe there's a problem with a link or something somewhere. I don't know.

I'm trying some of the smaple databases just now to see I can get any results from them.

Thanks for your suggestions though.
 
fraser_lindsay said:
Ken,

Sorry, yes I tried the column thing, but no luck.

I have tried a text box as well but I get the same result - blank query. Maybe there's a problem with a link or something somewhere. I don't know.

I'm trying some of the smaple databases just now to see I can get any results from them.

Thanks for your suggestions though.

I afraid I don't have any experience with smaple database... :( :p :p
(Just kidding :) )
 

Users who are viewing this thread

Back
Top Bottom