Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NULL datatype

Status
Not open for further replies.

chillay

Programmer
Jun 27, 2002
102
US
If I'm creating a Customer table that includes contact info and I require either a phone number or an email address, how can I ensure that both fields cannot be left blank? In other words, a customer's record can have an entry in the Phone column or in the Email column or in both, but it must have at least one or the other. How do I use the NOT NULL constraint so that either column may be null, but not both in the same record?

Thank you

Chillay
 
You can view the table properties and set the Validation Rule to:
[tt][blue]Not (IsNull([Phone]) And IsNull())[/blue][/tt]

[COLOR=Blue][B][I]Duane
[url=http://www.access.hookom.net/]Hook'D on Access[/url]
[url=https://mvp.support.microsoft.com/profile/Duane.Hookom]MS Access MVP[/url][/I][/B][/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top