When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
Here is the code as a whole...
My question is how do I make this work?
Thanks in advance for the help. I hope I asked the question correctly so NeoPa doesn't scold me...lol - I'm kidding my friend...
Code:
If subfrmLotInfo Is Null Then
MsgBox "You are required to enter your Material Lot Info", vbCritical, "No Material Lot Info"
Code:
Private Sub CMBPrint_Click()
If Me.Dirty Then
Me.Dirty = False
End If
If subfrmLotInfo Is Null Then
MsgBox "You are required to enter your Material Lot Info", vbCritical, "No Material Lot Info"
Else
If Me.NewRecord Then
MsgBox "Select a record to print", vbOKOnly, "No Record To Print"
Else
DoCmd.OpenReport "OEE-RPT", acViewPreview, , "LineID =" & [LineID], acWindowNormal
DoCmd.PrintOut acSelection, , , acHigh
DoCmd.Close acReport, "OEE-RPT", acSaveYes
DoCmd.GoToRecord acDataForm, "FrmLine", acNewRec
End If
End If
End Sub
Thanks in advance for the help. I hope I asked the question correctly so NeoPa doesn't scold me...lol - I'm kidding my friend...
Comment