If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
print different report based on value in control
I have a form for data entry and I want to add a command button that will
print a one of 2 reports for the current record. What determines the report is the value in the field FrameQty. If the value is 6 then I want to print Traveler6, if the value is 4 then I want to print Traveler4. Help is appreciated. |
#2
|
|||
|
|||
print different report based on value in control
On Mon, 6 Aug 2007 08:12:05 -0700, J wrote:
I have a form for data entry and I want to add a command button that will print a one of 2 reports for the current record. What determines the report is the value in the field FrameQty. If the value is 6 then I want to print Traveler6, if the value is 4 then I want to print Traveler4. Help is appreciated. Code the command button's click event: If Me.FrameQty = 4 or Me.FrameQty = 6 then DoCmd.OpenReport "Traveler" & Me.FrameQty End If -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#3
|
|||
|
|||
print different report based on value in control
I would use a Select Case statement because its easiest to change when (not if) you add reports/options in the futu Select Case FrameQty Case 4 DoCmd.OpenReport "Traveler4" Case 6 DoCmd.OpenReport "Traveler6" Case Else MsgBox "Unexpected Value" End Select "J" wrote in message ... I have a form for data entry and I want to add a command button that will print a one of 2 reports for the current record. What determines the report is the value in the field FrameQty. If the value is 6 then I want to print Traveler6, if the value is 4 then I want to print Traveler4. Help is appreciated. |
Thread Tools | |
Display Modes | |
|
|