Make Field Required

  • Thread starter Thread starter jh
  • Start date Start date
J

jh

I have a subform that has a field that I want to make
required. So in the table, I put Yes in required. This
works fine, except if I save the record and then delete
the required field, it allows me to do it.

In other words, the field name is "Impact". I need to
always have a value in "Impact". So when I try to move
off the record, it prompts me that this field needs to be
populated. So I populate it. However, when I save the
record and go back to the record and delete what's
in "Impact", it allows me to go to the next record.

Is there a way that I can always have this as a required
field and put the cursor in that field if it is left blank?

Thanks in advance.
 
jh said:
I have a subform that has a field that I want to make
required. So in the table, I put Yes in required. This
works fine, except if I save the record and then delete
the required field, it allows me to do it.

In other words, the field name is "Impact". I need to
always have a value in "Impact". So when I try to move
off the record, it prompts me that this field needs to be
populated. So I populate it. However, when I save the
record and go back to the record and delete what's
in "Impact", it allows me to go to the next record.

Double check your table design. "Required" should be enforced for edits as
well as insertions.
 
Rick

There is only 1 "Required" Property for the Field in the Table Design (AXP)
so I am not sure how you set it for "edits as well as insertions".

HTH
Van T. Dinh
MVP (Access)
 
Which data type this Field has? I guess this is a Text Field since Fields
of other data types don't behave like this.

If this is a Text Field, you probably need to set the "Allow Zero Length"
Property to False / No.

Check Access Help on "Required" Property and "AllowZeroLength" Property
paying attention to the interworking between these 2 Properties.

HTH
Van T. Dinh
MVP (Access)
 
I wasn't clear. I was saying that the one property "Required= Yes" should be
enforced by Jet for both insertions and edits so I was questioning whether the
setting was really set to "Yes". Either the setting is not correct or somehow a
zero-length-string is being allowed and that is actually what is getting in
there when the field is cleared. Unless a corrupted file could cause this.
 
Back
Top