473,513 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Required or Validation Rule Which

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
2 4262
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2675
by: Joey P | last post by:
Hi all, I am doing a project for university whereby i have to implement a simple database related to a frozen foods company. I am having some trouble though creating a validation rule for one...
2
1595
by: D Van | last post by:
Hello, Access 2003. I have a non-key field of type 'Number'. The 'Required' property is set to 'No'. The validation rule is '>0 Or Is Null'. The field is not indexed. Inserting a blank value...
2
2079
by: Mark Reed | last post by:
Hi all, This is probably a really simple question but I have been unable to figure it out. I have a field () which needs to have a value entered by the user but only if another field () is not...
6
3676
by: Chuck | last post by:
A97. A database has a table: tblA which has a single text field, B. It is a primary field, indexed and no duplicates. It is used as a lookup for table tblC. A form based on tblA is used to add...
3
1514
by: VB Programmer | last post by:
Can you make a required field validator optional? I know it sounds crazy, but.... Let's say I have a signup form. It consists of 2 sections. The top section is a "GOLD MEMBER" section. It...
4
2705
by: ron | last post by:
I have a access based guest book. I want to create a validation rule to block certain words or parts of a srting. How do i do this? ie: this is a nice site. come visit my porn site at www.abc.zy...
7
5943
by: sharsy | last post by:
Hi guys, I would like to setup a validation rule for a database in microsoft access that restricts data entry so that a certain field can only be filled in if another field has a specific answer...
1
2065
by: MLH | last post by:
Anyone remember if A97 append query failure would ever report data breaking validation rule when such was not the case. I have an old SQL statement - several years old now. I've encountered a case...
18
6194
by: ChipR | last post by:
I have a text box with a validation rule and validation text. When entering a new record, if I put in invalid text, the validation text is displayed in a message box, but after clicking OK, another...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.