S
ServiceEnvoy
I currently have a button with the following click event (which works
fine):
Private Sub Labor_Vendors_Form_Click()
On Error GoTo Err_Labor_Vendors_Form_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FRM_VendorsLabor"
stLinkCriteria = "[vendorID]=" & Me![VendorID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Labor_Vendors_Form_Click:
Exit Sub
Err_Labor_Vendors_Form_Click:
MsgBox Err.Description
Resume Exit_Labor_Vendors_Form_Click
End Sub
I need to modify this statement to include an if statement. If the
field named "contactsubtype" equals "labor vendor, it will open the
form called "frm_vendorsall", if not, open form called
"frm_vendorsresource". How do I incorporate this into the statement
above?
fine):
Private Sub Labor_Vendors_Form_Click()
On Error GoTo Err_Labor_Vendors_Form_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FRM_VendorsLabor"
stLinkCriteria = "[vendorID]=" & Me![VendorID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Labor_Vendors_Form_Click:
Exit Sub
Err_Labor_Vendors_Form_Click:
MsgBox Err.Description
Resume Exit_Labor_Vendors_Form_Click
End Sub
I need to modify this statement to include an if statement. If the
field named "contactsubtype" equals "labor vendor, it will open the
form called "frm_vendorsall", if not, open form called
"frm_vendorsresource". How do I incorporate this into the statement
above?