required field message box

sha7jpm

Registered User.
Local time
Today, 23:56
Joined
Aug 16, 2002
Messages
205
I have required fileds within a table, and therefore a message box appears if the user tries to save the record without entering all the required data.

when I take this table into a form, is there a way of changing the msgbox content, for at present it is pretty complicated text which I know will scare my users of the database to death!

I am unsure where the table calls this msgbox, as there is not vb code for it.

anybody know how to hack into this message box to change the text? or is it a lost cause.....

ta

John
 
Just a thought.

Maybe you could try displaying your own message box in an event that occurs immediately before saving. If the required field is empty that is.

Fuga.
 
I encountered the same problem as you and unfortunately I don't know how to solve it!

I came up with another sol though and it works fine if your end users are ONLY accessing the tables through the form. (No datasheet view etc.)

I just set the required property for a table field to No.
Then in the OnClick event of the "save" button on your form or whatever have the following VB code.

Dim Response As Boolean

If (IsNull(Forms![form_name]![particular_control])) Then
Response = Msg("The error message you would like...", vbExclamation, "Information Error!")
Else
...save statements...
End If

The thing to watch for though is to disable the close, X button on the form. If a user only enters half a record and then closes out of the form the record will be saved.

So the answer here is to disable this button and have another button on your form for exiting/closing the form so that you can watch for this, and yes, with this button comes even more code.

It's pretty long winded but it works! Hopefully you'll find a simpler soluation (and I'll kick myself if you do:-) ). Just in case all else fails you have this option.

Liam
 
Instead of the Required property in the table, why not use the Validation Rule along with a Validation Text message in the table?

For each "required" field in the table...

Set the Validation Rule property to Is Not Null

Set the Validation Text to The 'X' field can not be empty! Please key something in the 'X' field.

HTH
 

Users who are viewing this thread

Back
Top Bottom