Multiple reports from one combobox feed

G

Guest

I have a switchboard, and each button on the switchboard will run a different
report. I currently have each button first bring up a different form that has
only one combobox to select which client the coresponding report will run
for. Is there a way for me to call only one form with this combobox from each
of the different buttons and run the corresponding reports? I don't like
having a seperate form for each report to have it's own client selection. The
query behind the combobox is identical for each (only one field) so can
select client and feed that to the report. I have a button along with each
combobox to do report preview using the selected client. I am trying to keep
simple (not write code) to accomplish this task. It works having each
independently have their own selection form, but seems a waste if each of the
selection forms are the same doing the same thing, just feeding to a
different report. Thanks in advance for help.

Kenny A.
 
G

Guest

Hi Kenny

I dont really understand your question. I think you may have a form with
lots of bttons - each button will open a form. Each form has a combo box on
it and you are using query by form to pass the criteria to a report. ???

If so, can you not simply have the combo on the swtichboard.

Sorry if I missunderstand. Can you explain in a different way what you want
to do.
 
G

Guest

Wayne,

Sorry if I was not clear on my help request. I have several different
reports that run independent from each other. My switchboard has a button
for each report. Before any of the reports can run, a client needs to be
selected (this comes from a form with the combobox and a print preview
button). Currently I have one of these forms for each of the reports. I was
wondering if there is a way from the switchboard to call only one form to
select the client, click the print preview button and get the correct report
to run with the selected client. Hope this clearifies my request.
Thanks again
Kenny A.
 
G

Guest

Hi Kenny

I think this method could still have a few problems. Again I am assuming
that all the names are the same it is the reports that are different.

You could have 2 combos on a form and simply use the 1st to select the name
and the 2nd to select the report - Like this (oh I assume the names are in a
table ? and the titles of the reports are not)

Combo 1
Row Source Type Table/Query
Row Source
SELECT [TableName].[PrimaryField], [TableName].[1st Name],
[TableName].[Surname] FROM [TableName] ORDER BY [Surname];

Combo 2 - Use the AfterUpdateEvent

If (Forms!FormName!Combo2 = "Report1" Then
DoCmd.OpenReport "Report1", acViewNormal, "",
"[PrimaryField]=[Forms]![FormName]![Combo1]", acNormal
End If
If (Forms!FormName!Combo2 = "Report2" Then
DoCmd.OpenReport "Report2", acViewNormal, "",
"[PrimaryField]=[Forms]![FormName]![Combo1]", acNormal
End If
If (Forms!FormName!Combo3 = "Report1" Then
DoCmd.OpenReport "Report3", acViewNormal, "",
"[PrimaryField]=[Forms]![FormName]![Combo1]", acNormal
End If
etc
etc
 

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

Top