Marwa-
It must be a Validation Rule on the table, not on a field. Did you open the
table's Properties window?
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of m.statalex
Sent: Wednesday, June 29, 2011 2:32 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Validation Rule for Date
John, Thank you!
I still have a problem, when I entered that validation rule I got the message:
Invalid SQL syntax - cannot use multiple columns in a column-level CHECK
constraint.
I don't know what this means. Can you help??
Thanks once again!
Marwa
--- In MS_Access_Professionals@yahoogroups.com, "John Viescas" <john@...> wrote:
>
> Marwa-
>
> You can do it in the table directly. Open the table in Design view and then
> open the Properties window. In the Validation Rule, enter:
>
> =IsNull([Date Of Death]) Or (([Date Of Death] > [Date of Birth]) And ([Date Of
> Death] < Date()))
>
> In Validation Text, put a meaningful message such as:
>
> Date of Death must be later than Date of Birth and earlier than today.
>
> John Viescas, author
> Microsoft Office Access 2010 Inside Out
> Microsoft Office Access 2007 Inside Out
> Building Microsoft Access Applications
> Microsoft Office Access 2003 Inside Out
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Marwa Abo Amra
> Sent: Wednesday, June 29, 2011 1:23 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Validation Rule for Date
>
> Hi All,
>
> I need help in writing a validation rule for entering a date in a field. I
have
> a form that has two dates to be entered: Date of Birth and Date of Death. I
> would like to write a validation rule in the Date of Death control so that
users
> can only enter values greater than date of birth and before today. I am not
sure
> what to write in the validation rule of that field in the table that I created
> the form from so the form cannot accept any values of date that I mentioned.
>
> Waiting for your assistance, pals!
>
> Thank you.
>
> Marwa
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
------------------------------------
Yahoo! Groups Links
Rabu, 29 Juni 2011
RE: [MS_AccessPros] Validation Rule for Date
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar