Hi,
I have this code on a cmdbutton "cmdBarcode" called from my form "Jobs". I would like to call this from a Module instead of the form. I am having problem calling this from ta Module. I think it's the Me.Dirty that might be the problem.
Private Sub cmdBarcode_Click()
On Error GoTo Err_cmdBarcode_Click
Dim intResult As Integer
Dim strTitle As String
Dim strMsg As String
Dim intMsgDialog As Integer
Dim intResponse As Integer
strTitle = "Barcode Printing?"
intMsgDialog = vbOKOnly + vbInformation
If IsNull(Forms!Jobs![Delivery Dockets].Form!PltType) Then
strMsg = "Please make sure you have entered a Pallet type"
intResult = MsgBox(strMsg, intMsgDialog, strTitle)
ElseIf IsNull(Forms!Jobs![Delivery Dockets].Form!Quantity) Then
strMsg = "Please make sure you have entered a Quantity"
intResult = MsgBox(strMsg, intMsgDialog, strTitle)
Else
If Me.Dirty = True Then Me.Dirty = False
Forms![Jobs]![Delivery Dockets].Requery
Call openForm("frmBarcode")
End If
Exit_cmdBarcode_Click:
Exit Sub
Err_cmdcmdBarcode_Click:
MsgBox Err.Description
Resume Exit_cmdBarcode_Click
End Sub
Any assistance would be helpful...
Thanks
I have this code on a cmdbutton "cmdBarcode" called from my form "Jobs". I would like to call this from a Module instead of the form. I am having problem calling this from ta Module. I think it's the Me.Dirty that might be the problem.
Private Sub cmdBarcode_Click()
On Error GoTo Err_cmdBarcode_Click
Dim intResult As Integer
Dim strTitle As String
Dim strMsg As String
Dim intMsgDialog As Integer
Dim intResponse As Integer
strTitle = "Barcode Printing?"
intMsgDialog = vbOKOnly + vbInformation
If IsNull(Forms!Jobs![Delivery Dockets].Form!PltType) Then
strMsg = "Please make sure you have entered a Pallet type"
intResult = MsgBox(strMsg, intMsgDialog, strTitle)
ElseIf IsNull(Forms!Jobs![Delivery Dockets].Form!Quantity) Then
strMsg = "Please make sure you have entered a Quantity"
intResult = MsgBox(strMsg, intMsgDialog, strTitle)
Else
If Me.Dirty = True Then Me.Dirty = False
Forms![Jobs]![Delivery Dockets].Requery
Call openForm("frmBarcode")
End If
Exit_cmdBarcode_Click:
Exit Sub
Err_cmdcmdBarcode_Click:
MsgBox Err.Description
Resume Exit_cmdBarcode_Click
End Sub
Any assistance would be helpful...
Thanks