N
Nylex
Just trying to stop wrong entries from happening but the following wont work
____
Private Sub NewWorkOrder_Click()
On Error GoTo Err_NewWorkOrder_Click
Debug.Print PropDesc
'Exit this sub if No property selected
If PropDesc = "" Then Exit Sub
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Auto Orders"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
Exit_NewWorkOrder_Click:
Exit Sub
Err_NewWorkOrder_Click:
MsgBox Err.DesCription
Resume Exit_NewWorkOrder_Click
End Sub
______
I can not match the PropDesc - I have tried "" and Null - the debug says it
is Null but I can not get it to exit the sub if no property selected
____
Private Sub NewWorkOrder_Click()
On Error GoTo Err_NewWorkOrder_Click
Debug.Print PropDesc
'Exit this sub if No property selected
If PropDesc = "" Then Exit Sub
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Auto Orders"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
Exit_NewWorkOrder_Click:
Exit Sub
Err_NewWorkOrder_Click:
MsgBox Err.DesCription
Resume Exit_NewWorkOrder_Click
End Sub
______
I can not match the PropDesc - I have tried "" and Null - the debug says it
is Null but I can not get it to exit the sub if no property selected