Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening report based on drop down selection

Status
Not open for further replies.

bishman

Programmer
Jun 29, 2003
9
0
0
GB
Hi

Here's some Access VBA:

Dim found As Boolean
Dim frm As Form

found = False
For Each frm In Forms
        If frm.Name = "SelectType" Then
            found = True
        End If
Next
    
strReportType = Forms!SelectType!ReportTypeCombo.Value

Now depending on what has been chosen in the drop down list (ReportTypeCombo), how would I go about opening certain (already existing) reports?

TIA,
Bishman
 
Are you finding a report type (don't know what this means) or a report name? If this is a report name from the combo box, you could use code like:

DoCmd.OpenReport strReportType, acViewPreview

Duane
MS Access MVP
 
Yes, that's exactly it...thanks so much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top