Change error messages

scottappleford

Registered User.
Local time
Today, 01:35
Joined
Dec 10, 2002
Messages
134
Hi

I have two problems.

One when a required field is set to yes - i want to change the error message to something more meaningful.

Two i would like to stop people enetering data into a sub form on the main form when there is no data in the main form? I linked them using the wizard.

So main product linked to sub form with productID?

Many Thanks

scott
 
First, the error message you can change by going into the table and in the properties for the required field, look for Validation Text and type your message there.

Second, I would make the subform disabled until the main form has data. Set the subform's property as disabled and then in the AfterUpdate event of the main form set the subform to enabled. In order to not have to move forward and then back, maybe put a button that "saves" the record immediately. But, I'm sure there are myriad solutions to that situation.

You would need to set the subform to enabled or disabled also on the OnCurrent event of the main form, so when it changes records it will enable or disable it depending on whether there is information.
 
Help again

Hi

I have tried what you said but it seems to just ignore the text and say ' the field can not contain a null value'?

Please help - thanks

scott
 
Okay, in the Validation Rule property put

Is Not Null

and put in your text in the Validation Text property.

Then, change the REQUIRED property to NO.

The validation rule will force it to be required anyway.
 

Users who are viewing this thread

Back
Top Bottom