G
Guest
I have a form which has a button which opens a report.
I want to make the button refresh and then open the report.
Thanks.
The code for the button is:
Private Sub cmdOpCOBas_Click()
On Error GoTo Err_cmdOpCOBas_Click
Dim stDocName As String
Dim strWhere As String
strWhere = "[FVF#] = '" & Me.[FVF#] & "' AND Trade='" & Me.Trade & "'
AND [Change#]= " & Me.[Change#] & "AND Revision='" & Me.Revision & "'"
stDocName = "rptChOrdBasic1"
DoCmd.OpenReport stDocName, acPreview, , strWhere
Exit_cmdOpCOBas_Click:
Exit Sub
Err_cmdOpCOBas_Click:
MsgBox Err.Description
Resume Exit_cmdOpCOBas_Click
End Sub
I want to make the button refresh and then open the report.
Thanks.
The code for the button is:
Private Sub cmdOpCOBas_Click()
On Error GoTo Err_cmdOpCOBas_Click
Dim stDocName As String
Dim strWhere As String
strWhere = "[FVF#] = '" & Me.[FVF#] & "' AND Trade='" & Me.Trade & "'
AND [Change#]= " & Me.[Change#] & "AND Revision='" & Me.Revision & "'"
stDocName = "rptChOrdBasic1"
DoCmd.OpenReport stDocName, acPreview, , strWhere
Exit_cmdOpCOBas_Click:
Exit Sub
Err_cmdOpCOBas_Click:
MsgBox Err.Description
Resume Exit_cmdOpCOBas_Click
End Sub