Form design

  • Thread starter Thread starter Jim Lavery
  • Start date Start date
J

Jim Lavery

How can I get access to prompt for completion of certain essential fields if
not completed by the inputter as they try to exit a record.
 
Jim Lavery said:
How can I get access to prompt for completion of certain essential fields if
not completed by the inputter as they try to exit a record.

The simplest is to make the required fields at the table level. Then the record
will not save unless they are filled in. An alternative is to run code in the
form's BeforeUpdate event. That code can test to see which fiedls were not
filled in, cancel the update if an important field was not filled in and provide
a message to the user.

Simple example:

Private Sub Form_BeforeUpdate(Cancel As Integer)

If IsNull(Me!SomeField) Then
MsgBox "You must provide a value for Some Field"
Cancel = True
End Sub
 
Back
Top