Validating mandatory fields before adding record

rmaciel

New member
Local time
Today, 18:23
Joined
Dec 8, 2009
Messages
3
Hi,
How can I validate the form data entered before the record is submitted to a linked table?
I need this because the table has several mandatory fields and the following Access error message does not inform the user of a field left empty:

"ODBC: failed to insert to a linked table <<table name>>"

I couldn't find a suitable event to handle. For instance, 'before insert' happens before the controls are filled and 'after insert' after the record is submitted.

Thanks,
Ricardo Maciel
 
First off, there are many ways to ensure that the textbox in your form is not empty. You can use the on click event of your save button to check (write code that will check for null textboxes) any empty textbox that are needed to be filled first before saving.

Next, I dont know if the error that you are experiencing is related to empty values in your fields or textbox. Maybe the error might come from wrong table name, database name or failed linked table.
 
Last edited:
Try the Form's BeforeUpdate event, this event allows you to review the data entered by the user just before it is stored in the database.
 

Users who are viewing this thread

Back
Top Bottom