N
neenmarie
I have a button on a form to open a corresponding form. However, if there is
not corresponding data I'd like a message box to say that rather than having
a blank form open. How do I write the code for that? My current code is
simply:
Private Sub Command117_Click()
On Error GoTo Err_Command117_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FEASIBILITY SIGN OFF FORM"
stLinkCriteria = "[QuoteNumber]=" & Me![AutoID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command117_Click:
Exit Sub
Err_Command117_Click:
MsgBox Err.Description
Resume Exit_Command117_Click
End Sub
not corresponding data I'd like a message box to say that rather than having
a blank form open. How do I write the code for that? My current code is
simply:
Private Sub Command117_Click()
On Error GoTo Err_Command117_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FEASIBILITY SIGN OFF FORM"
stLinkCriteria = "[QuoteNumber]=" & Me![AutoID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command117_Click:
Exit Sub
Err_Command117_Click:
MsgBox Err.Description
Resume Exit_Command117_Click
End Sub