Results 1 to 3 of 3

Thread: required field

  1. #1
    Join Date
    Mar 2004

    Unanswered: required field

    I have another question, we have a data entry form that doesn't has notes field. that means the notes field is not required. But when they edit, in the edit form we have notes field that would like to be required field. How can i force the field to be required. By the way, all fields are in one table.

  2. #2
    Join Date
    Dec 2004
    Madison, WI
    Easiest way might be to set the Required value for that field to Yes in the table design. But this will require every record to have something in the Notes field. You can set the default value to something (ie..<Enter Notes>).

    Otherwise on the form, you can also check for a null value in that field if perhaps you need it required in some instances and other instances you don't (ie. if isnull(me!Notes) then....) Where you do this check depends on how the form interacts. If you have a "save" button on the form, you may want to put this code in the OnClick for the save event. Otherwise you can possibly do it in the OnClose event of the form. It's difficult to say where to do the check without seeing the form.
    Last edited by pkstormy; 08-03-07 at 14:08.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Mar 2004
    Yes, the second one is a good idea. How to pop up a error message when the note field is null. Thanks again!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts