Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a Required field to Null

Status
Not open for further replies.

spika71

Programmer
Aug 1, 2001
1
RU
I have four combos on my form that are bound to four non-nullable (Required) fields in a table. The nature of the data displayed by the combos is such that when the user changes one of them, all the combos to the right become invalid and must be reentered (e.g. if the user changes combo 2, they must reenter combos 3 and 4) I figured the best way to force reentry of the combos is to reset them to Null. Because the corresponding fields in the table are Required, the user will not be able to save the record until they fill the fields that were reset. Now the problem is, Access does not allow me to set a control to Null if it's bound to a Required field. I'd prefer it to defer the check until the record is saved.

Is there a way to bypass the check and set a required field to Null, while at the same time keep the Required attribute so that the record can't be saved with Null's in the Required fields?

Any help will be appreciated

Vladimir
 
Set it to "". I believe that will resolve your problem. Make sure that on the table verification for the field you include:
Not = ""

Steve King Growth follows a healthy professional curiosity
 
Are your combos pulling from lookup tables? I always use a 0 ID value, with a <none> name. When combo2 triggers, you can reset 3 and 4 to 0, and then check against 0 before allowing the user to move off the record
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top