hi guys,
i have the following code and it is giving me an error with this line
ElseIf IsNull(Frame92) & IsNull(Frame107) Then
the full code is listed below.
Code:
Private Function CheckBeforeSaving() As Boolean
If IsNull(Me.txtPart_Number) Then
MsgBox "Please select a Part Number from the list."
CheckBeforeSaving = False
Me!txtPart_Number.SetFocus
ElseIf IsNull(txtEvaporation_Lot) Then
MsgBox "Please enter Evaporation Lot."
CheckBeforeSaving = False
Me!txtEvaporation_Lot.SetFocus
ElseIf IsNull(txtDiffusion_Lot) Then
MsgBox "Please enter Diffusion Lot."
CheckBeforeSaving = False
Me!txtDiffusion_Lot.SetFocus
ElseIf IsNull(txtWork_Order) Then
MsgBox "Please enter Work Order."
CheckBeforeSaving = False
Me!txtWork_Order.SetFocus
ElseIf IsNull(txtOperator) Then
MsgBox "Please select your operator ID."
CheckBeforeSaving = False
Me!txtOperator.SetFocus
ElseIf IsNull(Frame92) & IsNull(Frame107) Then
MsgBox "Please select a Saw or Dicer."
CheckBeforeSaving = False
Else
CheckBeforeSaving = True
End If
End Function
the error says: error type data mismatch,
I'm not sure if the syntax is correct with the & in between the two IfNull.
This might help: there are a total of 8 check boxes, with values 1-8 that go to one, Saw_no. They are separated into two frames because depending on the part, the operator will choose a saw from either frame 92 or frame 107.
So it is either of those two, but both cannot remain empty when saving the record. i.e. Saw_no must always contain a value.
any help regarding this issue would be a marvelous help.
Thanks all!