Combo Box for a report

G

Guest

I want to generate a report by entering a vendor name which will pull-up that
vendors tasks. The way I have it now is it asks you to type in a vendor name
which has to be exact or Access willnot find the records. I would like to
have a combo box pop-up when the report is run with the list of vendors to
choose from.

Please Help

Thanks
 
R

Rick B

You would have to build a form and put the box on that form, then reference
it when running your report. This is called a parameter form and if you
search you should find previous posts.

You could also loosen up your criteria to allow partial entries.


Like "*" & [Enter Partial Vendor Name] & "*"
 
F

fredg

I want to generate a report by entering a vendor name which will pull-up that
vendors tasks. The way I have it now is it asks you to type in a vendor name
which has to be exact or Access willnot find the records. I would like to
have a combo box pop-up when the report is run with the list of vendors to
choose from.

Please Help

Thanks

Create an unbound form.
Add a combo box.
Set the Row Source of the combo box to include the
CompanyID field and the Company Name.
Name the Combo Box 'FindCompany'.
Set it's Bound column to 1.
Set the Column Width property to 0";1"

Add a Command Button to the form.
Code the button's click event:

Me.Visible = False

Name this form 'ParamForm'.

In the Report's Record Source [CompanyID] field criteria line write:
forms!ParamForm!FindCompany

Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the report's Close event:
DoCmd.Close acForm, "ParamForm"

When ready to run the report, open the report.
The form will open and wait for the selection of the Company.
Click the command button and then report will run.
When the report closes, it will close the form.
 
G

Guest

Dear fredg,

I've been reading your reply but I have a question, a have been trying to do
a similar thing but when it comes to my Report's Record Source I loose you.
My Report is based on a query and hence I've the following text as record
select allready;

SELECT Accounts.Group, [20050804].Account, [20050804].[Account name],
[20050804].Budget, [20050804].Forecast, [20050804].Outcome FROM Accounts
RIGHT JOIN 20050804 ON Accounts.Account=[20050804].Account;

My question is where I should put forms!ParaForm!FindCompany. I haven't been
able to put it in either my query or report.

I also get an error saying that the Me. macro does not exist.

Greatful to answers / Bell

"fredg" skrev:
I want to generate a report by entering a vendor name which will pull-up that
vendors tasks. The way I have it now is it asks you to type in a vendor name
which has to be exact or Access willnot find the records. I would like to
have a combo box pop-up when the report is run with the list of vendors to
choose from.

Please Help

Thanks

Create an unbound form.
Add a combo box.
Set the Row Source of the combo box to include the
CompanyID field and the Company Name.
Name the Combo Box 'FindCompany'.
Set it's Bound column to 1.
Set the Column Width property to 0";1"

Add a Command Button to the form.
Code the button's click event:

Me.Visible = False

Name this form 'ParamForm'.

In the Report's Record Source [CompanyID] field criteria line write:
forms!ParamForm!FindCompany

Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the report's Close event:
DoCmd.Close acForm, "ParamForm"

When ready to run the report, open the report.
The form will open and wait for the selection of the Company.
Click the command button and then report will run.
When the report closes, it will close the form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Linking one report to another 1
Use combo box to specifiy record 3
Message Request Box 2
Combo Box on Report 10
Save reports as unique files 1
combobox rowsource 3
Grouping by common bond 2
report summary 1

Top