O
okschlaps
I have some (I thought) simple code to save a record so that when an
associated form was opened for printing it would have the current info. I
tested it and it worked fine the first time. Now I'm getting a "RunCommand
action was canceled" message. I can't figure out what's changed:
Here's the code:
Private Sub cmdOpenChesapeake_Click()
On Error GoTo Err_cmdOpenChesapeake_Click
Dim stDocName As String
Dim stLinkCriteria As String
Me.Dirty = False
DoCmd.RunCommand acCmdSave
stDocName = "Lease Purchase Report CELP"
stLinkCriteria = "[LPR_No]=" & "'" & Me![LPR_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenChesapeake_Click:
Exit Sub
Thanks!
associated form was opened for printing it would have the current info. I
tested it and it worked fine the first time. Now I'm getting a "RunCommand
action was canceled" message. I can't figure out what's changed:
Here's the code:
Private Sub cmdOpenChesapeake_Click()
On Error GoTo Err_cmdOpenChesapeake_Click
Dim stDocName As String
Dim stLinkCriteria As String
Me.Dirty = False
DoCmd.RunCommand acCmdSave
stDocName = "Lease Purchase Report CELP"
stLinkCriteria = "[LPR_No]=" & "'" & Me![LPR_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenChesapeake_Click:
Exit Sub
Thanks!