Error handling on new record

AndySuk

Registered User.
Local time
Today, 13:46
Joined
Jan 17, 2007
Messages
23
Hi

I have an invoice-input form which allows a selection of Purchase Orders and Statements of Work from drop-down boxes. When I use the Add new command to add a new invoice I get an error message saying that the PO or SoW numbers are invalid if they haven't been filled in. This maybe because those particular numbers are not yet available.

When I try and move from the record to another one I get an error message saying that the PO ro SoW are not valid (even though the tables can accept a null) and I was wondering if anyone could suggest a way to handle the error?

Thanks

A
 
Is the Add New command behind a button? Try this code:

Private Sub btnAddNew_Click
DoCmd.Close
DoCmd.OpenForm "frmName", , , , acFormAdd
End Sub

In order to be able to say something about your record moving err msg, u need to provide more info about the underlying data (tables, queries, etc.)

HTH
 

Users who are viewing this thread

Back
Top Bottom