On our Order Entry form, the user will check a radio button for either Company1 (value = 1) or Company2 (value = 2). The next field they enter is the Customer Number. If they clicked on Company2, then the Customer Number they enter MUST end with a T....for example, the customer number might be MED03T (it's always 6 characters and it always ends with a T). If they clicked on Company 1, it CANNOT end with a T....for example, the customer number might be MED03. I am trying to put a verification in my form (presumably in the BeforeUpdate event of the CustomerNo field), but I don't know the syntax (all I'm really trying to do is give a message if it's wrong) It should go something like this...
If Me.CompanyID = 1 and Me.CustomerNo = *T, then
MsgBox "You've entered an incorrect customer number"
.
.
.
The 2 conditions that must be met are:
1) If CompanyID = 1, then the CustomerNo must NOT end with a T
2) If CompanyID = 2, then the CustomerNo MUST end with a T
Thanks for any help....
Darrell