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 / Modules / DAO / VBA / September 2005

Tip: Looking for answers? Try searching our database.

how do i connect two feilds through a validation rule?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Timbo2020 - 09 Sep 2005 20:47 GMT
My name is Tim.
I am currently working an internship with a department with little help from
my professors.  I am currently trying to set up a validation rule for two
fields.  The two feilds are "Lock" which has a yes/no opion to it and the
other is "Lock Information" which will hold the lock information about the
lock.  The validation rule that I would like to create is sort of linking the
two feilds.  Something like this.....
If Lock is yes then Lock information is required.
If Lock is no then Lock Information is not required.

Is this possible?
SimonW - 09 Sep 2005 22:11 GMT
As far as i know, you can perform this kind of validation on a form.

Use the AfterUpdate property of the form's lock control e.g. right-click the
lock checkbox and build an event

If lock = True Then
 lockinfo.Enabled = True
else
 lockinfo.Enabled = false
endif

You can use a Macro to do the same thing and call the macro with the
AfterUpdate() event

Rgrds,

> My name is Tim.
> I am currently working an internship with a department with little help from
[quoted text clipped - 7 lines]
>
> Is this possible?
Tim Ferguson - 10 Sep 2005 20:23 GMT
> If Lock is yes then Lock information is required.
> If Lock is no then Lock Information is not required.

Faulty data analysis; you don't have two separate bits of information here,
since <no lock information> is just one type of lock information.

You need a single field; you could either settle for a NULL value to
indicate that there is no lock information, or you could establish a
specific <no lock information> value to use. It's still a single domain.

Using a _table level_ validation rule like

 (Lock = TRUE) XOR (LockInformation IS NULL)

will achieve what you describe, but it won't make it right.

Hope that helps

Tim F
 
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.