I thought this would be a very basic VBA code. I'm trying to open a report, using a command button, based on a mutual field in the report and on the open form [positionID].
While it does open the report, it is not limiting the report to that specific [positionID].
---------------------
Private Sub Command553_Click()
If Me.PositionStatus.Value = "Per Diem" Then
DoCmd.OpenReport "Offer Packet_Cover PerDiem", acViewPreview, , [PositionID] = Me.[PositionID]
End If
End Sub
-----------------------------
:banghead:
While it does open the report, it is not limiting the report to that specific [positionID].
---------------------
Private Sub Command553_Click()
If Me.PositionStatus.Value = "Per Diem" Then
DoCmd.OpenReport "Offer Packet_Cover PerDiem", acViewPreview, , [PositionID] = Me.[PositionID]
End If
End Sub
-----------------------------
:banghead: