Different Report Forms Based on Field in Query (1 Viewer)

chastst

Registered User.
Local time
Today, 06:39
Joined
Oct 19, 2000
Messages
17
Is there a way to select a different report form based on a field in a query? I would like to show one report if the equipment type is compressor, and a different report if the equipment type is pump.

Just wondering,
Thanks
 

Fornatian

Dim Person
Local time
Today, 06:39
Joined
Sep 1, 2000
Messages
1,396
I would use a select case statement to select the approproriate action.

e.g.

Select Case Me.MyEquipmentType

Case = "Compressor"
docmd.openreport "Compressor Report"

Case = "Next Equipment Item"
docmd.openreport "Other Equipment Report"

and so on...

Case Else
Msgbox "Please select an item from the drop down box provided"
End Select


Don't forget a Case Else statement to
encompass users bad habits(clicking buttons before selecting etc..)

Hope that works...

Ian
 

Users who are viewing this thread

Top Bottom