not saving records with null values

J

JOHN

MVP,
over view of form
on a form i have red field and blue fiels. i want all the
red fields to be required when saving any new records in
my DB. the blue fields are optional. on the red fiels i
set the "validation rule" under "propoties" to "Is Not
Null" because i dont want to form to be able to save a new
record to the DB with out all red fields filled out.



the problem
The validation rule only seem so aply to the first field
on the form. am i doing something wrong...??any ideas?

thanks so much for your help,
JOHN
 
J

Jim/Chris

Why not set the fields required in the design of the table.
That should solve the problem.

Jim
 
G

Guest

there are many old record from the old excel spread sheet
that have many blank fiels wont I loose records when a
require not null valuse in fields?
 
R

Rick Brandt

JOHN said:
MVP,
over view of form
on a form i have red field and blue fiels. i want all the
red fields to be required when saving any new records in
my DB. the blue fields are optional. on the red fiels i
set the "validation rule" under "propoties" to "Is Not
Null" because i dont want to form to be able to save a new
record to the DB with out all red fields filled out.



the problem
The validation rule only seem so aply to the first field
on the form. am i doing something wrong...??any ideas?

Make them required in the Table definition. Validation rules for form controls
only apply if you actually enter the control and enter something. If the
control is never given focus, the validation rule doesn't do anything.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top