By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,482 Members | 2,107 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,482 IT Pros & Developers. It's quick & easy.

Need Help in Access

P: n/a
I have a form(fAddUsers) in my database. It is continue form for data
entry. Some fields are required fields. Some are optional fields.
There is 1 particular filed(TokenExpirationDate)on the form which is
depended on the other field(TokenID)whether it is blank or not. If
the "TokenID" field is blank, the "TokenExpirationDate" field can be
blank also. But if the "TokenID" field is not blank or null, the
"TokenExpirationDate" field must be entered before the users attempts
to enter data into next record.

The task that I want to perform on the form is as follows:

1. Check to see if mandatory fields are empty, if they are display
message to users about which fields need to be completed;
2. Check to see if "TokenID" field is blank or null, if it is
blank or null, user can skip "TokenExpirationDate" field and allows to
enter data into next new record. If the "TokenID" field is not null,
the "TokeExpirationDate" must be entered before entering data into new
record.

Could someone please help me to solve this problem? I thank you for
your kind assistance.

Anna
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 1 Sep 2003 18:23:42 -0700, qs*******@hotmail.com
(qs*******@hotmail.com) wrote:

Write your code in the Form_BeforeUpdate event, and set Cancel to True
if not valid.

-Tom.

I have a form(fAddUsers) in my database. It is continue form for data
entry. Some fields are required fields. Some are optional fields.
There is 1 particular filed(TokenExpirationDate)on the form which is
depended on the other field(TokenID)whether it is blank or not. If
the "TokenID" field is blank, the "TokenExpirationDate" field can be
blank also. But if the "TokenID" field is not blank or null, the
"TokenExpirationDate" field must be entered before the users attempts
to enter data into next record.

The task that I want to perform on the form is as follows:

1. Check to see if mandatory fields are empty, if they are display
message to users about which fields need to be completed;
2. Check to see if "TokenID" field is blank or null, if it is
blank or null, user can skip "TokenExpirationDate" field and allows to
enter data into next new record. If the "TokenID" field is not null,
the "TokeExpirationDate" must be entered before entering data into new
record.

Could someone please help me to solve this problem? I thank you for
your kind assistance.

Anna


Nov 12 '05 #2

P: n/a
Anna

"A record validation rule controls when an entire record can be saved.
Unlike field validation rules, record validation rules can refer to
other fields. This makes them useful when you want to compare values
from different fields in a table. You define a record validation rule
in a table." - MS Access Help

For example, I need to ensure that:
- if student completed full qualification (Achievement status]=1), a
date, when s/he achieved entered;
- if student completed some modules of qualification (Achievement
status]=2), a date, when s/he achieved and number of modules/units are
entered;
- if student didn't achieve, neither data, no number of modules/units
are required.
To enforce the above rules on users' input, I entered into Table's
properties:
Validation Rule:
([Achievement status]=1 And Not IsNull([When])) Or ([Achievement
status]=2 And Not IsNull([When]) And [Units No]>0) Or ([Achievement
status]=0) Or ([Achievement status]=3)
and Validation Text:
If you entered that the student achieved on this qualification, or
partially achieved, you have to enter the date. Also, if partially
achieved, you should enter a number of units completed.
Hope this will help.
Galina
qs*******@hotmail.com (qs*******@hotmail.com) wrote in message news:<ed**************************@posting.google. com>...
I have a form(fAddUsers) in my database. It is continue form for data
entry. Some fields are required fields. Some are optional fields.
There is 1 particular filed(TokenExpirationDate)on the form which is
depended on the other field(TokenID)whether it is blank or not. If
the "TokenID" field is blank, the "TokenExpirationDate" field can be
blank also. But if the "TokenID" field is not blank or null, the
"TokenExpirationDate" field must be entered before the users attempts
to enter data into next record.

The task that I want to perform on the form is as follows:

1. Check to see if mandatory fields are empty, if they are display
message to users about which fields need to be completed;
2. Check to see if "TokenID" field is blank or null, if it is
blank or null, user can skip "TokenExpirationDate" field and allows to
enter data into next new record. If the "TokenID" field is not null,
the "TokeExpirationDate" must be entered before entering data into new
record.

Could someone please help me to solve this problem? I thank you for
your kind assistance.

Anna

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.