Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / February 2008

Tip: Looking for answers? Try searching our database.

validation for a field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sheena - 29 Feb 2008 10:08 GMT
I have a field called account number which can only consist of 9 characters
in total in most instances the account number consists of just 9 numbers but
rarely there are ones that have 8 numbers and an x on the end.
i have set the field type to "text" and i have set the validation rule as
<>9 and the validation text as must contain 9 characters.
when i test this with incorrect data it works well i get the relevant
message but wen i test this with borderline data e.g. 41256983x i get an
error message saying check constraints.
can anybody help me as i'm not sure where i'm going wrong i am fairly new to
access.
Thank you
Jeanette Cunningham - 29 Feb 2008 12:07 GMT
Sheena,
try this
   Like "?????????"
Or
if you want to allow nulls
   Is Null OR Like "?????????"

The above is 9 question marks

Jeanette Cunningham

>I have a field called account number which can only consist of 9 characters
> in total in most instances the account number consists of just 9 numbers
[quoted text clipped - 9 lines]
> access.
> Thank you
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.