Form error -required data missing

P

Pat Garard

G'day All,

I have a Form that uses a Tab Control.

The first tab has the data for the underlying table - the others
have subforms.

Three items of data are required. If the user has left a required
item blank and switches tabs, there is an (expected) error message
that required data is missing.

I would like to trap that error, but am unable to identify the Event
producing it. (I have tried _BeforeUpdate and _BeforeInsert).

Can you assist?
 
A

Allen Browne

Try the Error event of the form. That should trap it if it's an engine-level
error.
 
T

Tom Wickerath

Hi Pat,

Have you tried writing some validation code and placing it in the On Change
event for the tab control. This event fires when you move from one page to
another page in a tab control.

Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

G'day All,

I have a Form that uses a Tab Control.

The first tab has the data for the underlying table - the others
have subforms.

Three items of data are required. If the user has left a required
item blank and switches tabs, there is an (expected) error message
that required data is missing.

I would like to trap that error, but am unable to identify the Event
producing it. (I have tried _BeforeUpdate and _BeforeInsert).

Can you assist?
 
P

Pat Garard

Thanks Allen - problem solved!

I just needed to slow down long enough for the Penny to Drop!
 
P

Pat Garard

Thanks Tom!

I have combined Allene's suggestion with yours - I now have
control of the process!
 
T

Tom Wickerath

Hi Pat,

Glad to hear that you got it working.

Tom
__________________________________
 
Top