Combo box and reports

C

cwhitmore

I would like to use a combo box to show only the reports you
want end users to view? Any suggestions?
 
D

Damon Heron

Create a table with the list of report names. Source of combo box is table.

Damon
 
F

fredg

I would like to use a combo box to show only the reports you
want end users to view? Any suggestions?

Create a table ... "tblReports"

Store the actual report in one field
Store a user friendly short report name in the second field.
ActualRptName ShortRptName
rptStatements Statement
rptInvoices Invoice


Set the Combo Rowsource to:
Select tblReports.ActualRptName, tblReports.ShortRptName from
tblReports Order By [ShortRptName];

Set the Combo Column Count to 2.
Set the Bound column to 1.
Set the Column Widths property to
0";1"
Set the LimitTo List to Yes.
Set AutoExpand to Yes.

Code the Combo AfterUpdate event:

Do.Cmd.OpenReport Me.[ComboName] , acViewPreview

When the user selects the report name and click on it, the report
will open.
 
B

BruceM

You should say what you are doing so far to get a list of reports. From
another thread on this topic I gather that the problem is not listing
reports, but rather listing only a select group of reports.
 
C

cwhitmore

i'm just starting to dig in and wanted to do a little research before
starting. i've read about two methods, one using a table to list the reports
in conjunction with a combo or list box to display the names. The second,
involves creating a form with a list box and using a module.

I want the simplest solution as I would like end-users to view a list of
reports specific to their area only and then print.
 
C

cwhitmore

I tried your below suggestion, thanks. I receive the error message "Microsoft
Office Access can't find the Macro 'Do'.

It says the macro doesn't exist? Any thoughts?

kind regards
I would like to use a combo box to show only the reports you
want end users to view? Any suggestions?

Create a table ... "tblReports"

Store the actual report in one field
Store a user friendly short report name in the second field.
ActualRptName ShortRptName
rptStatements Statement
rptInvoices Invoice

Set the Combo Rowsource to:
Select tblReports.ActualRptName, tblReports.ShortRptName from
tblReports Order By [ShortRptName];

Set the Combo Column Count to 2.
Set the Bound column to 1.
Set the Column Widths property to
0";1"
Set the LimitTo List to Yes.
Set AutoExpand to Yes.

Code the Combo AfterUpdate event:

Do.Cmd.OpenReport Me.[ComboName] , acViewPreview

When the user selects the report name and click on it, the report
will open.
 
F

fredg

I tried your below suggestion, thanks. I receive the error message "Microsoft
Office Access can't find the Macro 'Do'.

It says the macro doesn't exist? Any thoughts?

kind regards
I would like to use a combo box to show only the reports you
want end users to view? Any suggestions?

Create a table ... "tblReports"

Store the actual report in one field
Store a user friendly short report name in the second field.
ActualRptName ShortRptName
rptStatements Statement
rptInvoices Invoice

Set the Combo Rowsource to:
Select tblReports.ActualRptName, tblReports.ShortRptName from
tblReports Order By [ShortRptName];

Set the Combo Column Count to 2.
Set the Bound column to 1.
Set the Column Widths property to
0";1"
Set the LimitTo List to Yes.
Set AutoExpand to Yes.

Code the Combo AfterUpdate event:

Do.Cmd.OpenReport Me.[ComboName] , acViewPreview

When the user selects the report name and click on it, the report
will open.

Is this your first attempt at writing code?

On the Combo Box's AfterUpdate event line write:
[Event Procedure]
Then click on the little button with 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already existing lines of code.
Between those lines, write:

Do.Cmd.OpenReport Me.[ComboName] , acViewPreview

Exit the code window.
Save the changes.
Open the form and select the report.
That report will run.
 
C

cwhitmore via AccessMonster.com

I don't write code on a regular basis nor am i formally trained, please
excuse my ignorance. I've done exactly what you suggested below and receive a
compile error message.
regards
I tried your below suggestion, thanks. I receive the error message "Microsoft
Office Access can't find the Macro 'Do'.
[quoted text clipped - 31 lines]
Is this your first attempt at writing code?

On the Combo Box's AfterUpdate event line write:
[Event Procedure]
Then click on the little button with 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already existing lines of code.
Between those lines, write:

Do.Cmd.OpenReport Me.[ComboName] , acViewPreview

Exit the code window.
Save the changes.
Open the form and select the report.
That report will run.
 
C

cwhitmore via AccessMonster.com

thanks a ton man the code worked afterall. i removed the "." Do.Cmd so that
it reads DoCmd

Best regards
I would like to use a combo box to show only the reports you
want end users to view? Any suggestions?

Create a table ... "tblReports"

Store the actual report in one field
Store a user friendly short report name in the second field.
ActualRptName ShortRptName
rptStatements Statement
rptInvoices Invoice

Set the Combo Rowsource to:
Select tblReports.ActualRptName, tblReports.ShortRptName from
tblReports Order By [ShortRptName];

Set the Combo Column Count to 2.
Set the Bound column to 1.
Set the Column Widths property to
0";1"
Set the LimitTo List to Yes.
Set AutoExpand to Yes.

Code the Combo AfterUpdate event:

Do.Cmd.OpenReport Me.[ComboName] , acViewPreview

When the user selects the report name and click on it, the report
will open.
 
Top