R
Rita
Attempting to set up validation at form BeforeUpdate. Am checking a combo
box, if it's "" or Null, then Serial and Order can be left Null or "" (Serial
and Order are both Txt) All controls are bound.
PartID looks at Part Table with 2 columns, only using description in form,
column 1 is 0". Using PartID to populate table being updated with
information. I'm sure I'm not getting null and "" straight. Thanks for any
help!
Here's the code.
If (IsNull(Me![Serial]) Or Me![Serial] = "") Or (IsNull(Me![SOrder]) Or
Me![SOrder] = "") And (Not IsNull(Me![PartID]) Or Me![PartID] <> "") Then
Beep
MsgBox "Equipment Entered. Must enter Serial # and/or Sales Order",
vbCritical
End If
If (IsNull(Me![Serial]) Or Me![Serial] = "") Or (IsNull(Me![SOrder]) Or
Me![SOrder] = "") And (Not IsNull(Me![PartID]) Or Me![PartID] <> "") Then
Cancel = True
Me![Serial].SetFocus
End If
box, if it's "" or Null, then Serial and Order can be left Null or "" (Serial
and Order are both Txt) All controls are bound.
PartID looks at Part Table with 2 columns, only using description in form,
column 1 is 0". Using PartID to populate table being updated with
information. I'm sure I'm not getting null and "" straight. Thanks for any
help!
Here's the code.
If (IsNull(Me![Serial]) Or Me![Serial] = "") Or (IsNull(Me![SOrder]) Or
Me![SOrder] = "") And (Not IsNull(Me![PartID]) Or Me![PartID] <> "") Then
Beep
MsgBox "Equipment Entered. Must enter Serial # and/or Sales Order",
vbCritical
End If
If (IsNull(Me![Serial]) Or Me![Serial] = "") Or (IsNull(Me![SOrder]) Or
Me![SOrder] = "") And (Not IsNull(Me![PartID]) Or Me![PartID] <> "") Then
Cancel = True
Me![Serial].SetFocus
End If