InsaneProgrammer
Programmer
I have two fields on my form, PurchaseEstimateNumber and ContractNumber, that cannot both contain a value or be null. One of the fields must always have a value. The code I wrote doesn't seem to work. I've tried putting it everywhere on the form (After Update, On Change, On Exit, etc..). Does anyone have a suggestion? THANKS!
If ([PurchaseEstimateNumber] <> Null) And ([ContractNumber] <> Null) Then
Beep
MsgBox "The record cannot have a PE# and a Contract#"
ElseIf ([PurchaseEstimateNumber] = Null) And ([ContractNumber] = Null) Then
Beep
MsgBox "The record must contain a PE# or a Contract#"
Else
End
End If
If ([PurchaseEstimateNumber] <> Null) And ([ContractNumber] <> Null) Then
Beep
MsgBox "The record cannot have a PE# and a Contract#"
ElseIf ([PurchaseEstimateNumber] = Null) And ([ContractNumber] = Null) Then
Beep
MsgBox "The record must contain a PE# or a Contract#"
Else
End
End If