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 / Forms / February 2008

Tip: Looking for answers? Try searching our database.

Data Integrtiy

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mrakulis - 29 Feb 2008 06:28 GMT
I need to limit people form entering data outside a range that has been set.
but i need it to check that range from a table or form. How do i do so?
Allen Browne - 29 Feb 2008 07:18 GMT
Open the table in design view.
Select the date/time field you wish to limit.
In the lower pane, beside the Validation Rule, enter something like this:
   Between #1/1/1900# And #1/1/2100#

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I need to limit people form entering data outside a range that has been
>set.
> but i need it to check that range from a table or form. How do i do so?
Mrakulis - 29 Feb 2008 09:07 GMT
The Values i am entering are int values. and instead of putting values into
the validation rule, i Would like it to check values in other table. eg
between field_A and field_B. But it doesn't allow me to look up from table
view. Pls help

> Open the table in design view.
> Select the date/time field you wish to limit.
[quoted text clipped - 4 lines]
> >set.
> > but i need it to check that range from a table or form. How do i do so?
Allen Browne - 29 Feb 2008 10:16 GMT
In the context of a form, you can use the BeforeUpdate event of the Form to
test whether the value is in range.

That won't work in other contexts though (e.g. entering directly into a
table, or using an Append query.)

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> The Values i am entering are int values. and instead of putting values
> into
[quoted text clipped - 10 lines]
>> >set.
>> > but i need it to check that range from a table or form. How do i do so?
Mrakulis - 29 Feb 2008 10:30 GMT
Allen. Do you mind giving mw your e-mail so i can send you an example of what
i am trying to do? pls

> In the context of a form, you can use the BeforeUpdate event of the Form to
> test whether the value is in range.
[quoted text clipped - 16 lines]
> >> >set.
> >> > but i need it to check that range from a table or form. How do i do so?
Allen Browne - 29 Feb 2008 11:48 GMT
Hope you understand we cannot accept databases from everyone and do your
debugging for you.

Your choices are:
a) Use table-level validation:
   - Advantage: works in every context
   - Disadvantage: not flexible enough for lookups

b) Use form-level validation:
   - Advantage: powerful and programmable
   - Disadvantage: does not apply in other contexts.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Allen. Do you mind giving mw your e-mail so i can send you an example of
> what
> i am trying to do? pls
Mrakulis - 29 Feb 2008 12:58 GMT
I understand Completely. Wanted to show screenshots.

> Hope you understand we cannot accept databases from everyone and do your
> debugging for you.
[quoted text clipped - 11 lines]
> > what
> > i am trying to do? pls
 
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.