Validation rules

Hellfire

Registered User.
Local time
Today, 14:51
Joined
Jul 23, 2002
Messages
57
I still seek HELP! PLease, ANYONE!

Hi All,

I have asked this beore, but none of you replied. I have a form that users use to enter information on. All the fields are set to "required". If they do not enter information in the fields, I want Access to display a custom message.

I know that the text I want to be displayed should be entered into the Validation text.

I have trouble with the Vailidation rules however. All I want is that if the box is left blank, the message should be displayed. What do I need to set the Validation rule to...Is null??!

Please help.

Thanks
 
Last edited:
Where should I enter this text? In the validation rule box?
It doesn't seem to be working
 
This is much better handled at form level using the BeforeUpdate event or the Tag property of the control, there have been many examples posted here, search for validate
 
Hi again...

I have no idea how to use the Tag field. If I use the before update field, should I do an event procedure?

If so, I have never reallly done the scripting before, I guess it should be in the format:

Private Sub FieldName_BeforeUpdate()
If Me.[FieldName] = Null Then
*************************

End If

End sub

As you can see, I NEED HELP!!

the *** should be constituted with a command to display a message.

Please help.

Thanks
 
Hi,

I am still searching for a way to get the validation stuff sorted out.

Anybody, please help!

I ask you with tears in my eyes.

Thanks
 
I'm having this discussion ALL BY MYSELF!

Is someone gonna help me or not??

Please??

It cannot be that difficult, what's happening is:

The msg I want is displayed, when the user click ok, the standard Access msg is still displayed, when they click ok on that, the form closes without giving them the chance to fill in the missing fields. It doesn't save the record either.

Please help me, what do I need to do to get the msg box to appear, saying, "please enter a valid username" and when my users click OK, they should go back to the form, without the Access msg displayed?

I have the following in the on Unload field of my form:

Private Sub Form_Unload(cancel As Integer)

If IsNull(Me![Fieldnam]) Then
iLetFormClose = 0
Me![Fieldname].SetFocus
Else
iLetFormClose = 1
End If

End Sub

What is wrong?
 

Users who are viewing this thread

Back
Top Bottom