By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,491 Members | 3,273 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,491 IT Pros & Developers. It's quick & easy.

Required or Validation Rule Which

P: n/a
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
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"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
Nov 12 '05 #2

P: n/a
Try using the Form's OnError event to trap the error and replace it with your own error
message. The error number (DataErr) will be 3314.

--
Wayne Morgan
Microsoft Access MVP
"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

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.