Validation in customerID field

buddythebest

Registered User.
Local time
Today, 21:17
Joined
Mar 31, 2006
Messages
32
In a school, a customer ID (in a canteen for example) would be either student administration number or staff initials.... how can i make this customerID field so that it accepts either all numbers (for student admin. no.) or all text with only 3 letters (for staff initials)?


thank you plz reply soon
 
make sure that your customer Id field in your table has a datatype of text
 
no, i mean can i create a "validation" so that accepts only all numbers or all text (i already have it as text datatype), if it requires Visual Basic just consider that i am a complete newb in it
 
I would suggest a design change. Add staff to your student table and assign them a CustomerID number. That is the ONLY way you will be able to enforce referential integrity. You can't enforce RI when the value for a field can be from A or from B regardless of whether the fields are the same data type or not.
 

Users who are viewing this thread

Back
Top Bottom