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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Required Form Field

Status
Not open for further replies.

bradleyhorn

Technical User
Sep 15, 2004
35
0
0
US
Hi All,

I have a form in which I have added new fields. I have also added new fields to the underlying DB table. I would like to make the fields required. How does one make a field required at the form level? Should I create a message if the form field is null? Or will the database accept it if I update the new DB fields to "required"?

Bradley
 

bradleyhorn,

You can simply change the underlying table, it is also best to do it table level. If you set the required property of a field to true in a table design then if a user attempts to create a new record in form view and does not input data in the required field, a message will occur telling them that they must enter data as the field's required property is set to true. You may have problems if some entries for that field in the table are empty when you attempt to change it to required.

Mordja
 
You should make the fields required in the table. Go to design view and select the field in question. In the lower panel (properties), set the Required property to Yes. If your form is bound to the table, the field will be required when you make new entries.

Before making the field required -- make sure you have an entry for that field in all records. You won't be able to save your changes otherwise.



Randy
 
Should I do an update query that sets all null fields equal to "Some Value" before making the field required at the DB level?

Bradley
 
I have made sure all fields have something in them and the confirmed field in my confirm table, has required marked as yes in both front and back end tables, however, when I open up a new form and enter information and put nothing in the conformed box, then close the form, Nothing happens. Nothing tells me that something ahs to be put inot that field.....arggg

ab
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top