"Dalan" <ot***@safe-mail.net> wrote in message
news:50**************************@posting.google.c om...
This ought to be simple enough, but not certain which to use. I have a
few fields set to Require data to be entered; however, the message
displayed by Access 97 is too generic to be of any real value. I tried
attaching a specific message for this in the table properties, but was
unsuccessful. Can this be done?
I then opted for Not Is Null as the Validation Rule and with specific
Validation Text. That was better up to a point and assume this method
is the of the same equivalence. However, leaving one or more of the
fields blank and then saving or exiting the record triggered the
information message, but no indication as to which field(s) it was
referencing. Obviously, this is not of much benefit.
Does anyone have any ideas as to what is the best method and specific
tips of implementing? Thanks, Dalan
You can have a different Validation Text entry per field, but apparently
when more than one rule is violated you only get a report on the first one
and wouldn't be told about the second one until after you had corrected the
entry on the first one. In a form I usually use the BeforeUpdate event to
do all validation at once and display one MsgBox indicating everything that
was found wrong. The method (simplified) goes like this.
Dim DataEntryErr as String
'variable starts out 15 characters long.
DataEntryErr = "You screwed up!"
If SomeTest on Field1 fails Then
DataEntryErr = DataEntryErr & vbcrlf & "Problem with Field1"
End If
If SomeTest on Field2 fails Then
DataEntryErr = DataEntryErr & vbcrlf & "Problem with Field2"
End If
repeat as necessary...
If Len(DataEntryErr) > 15 Then
MsgBox DataEntryErr
Cancel = True
End if
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com