Supressing errors on sub forms

Dazza666

Registered User.
Local time
Today, 11:22
Joined
Aug 13, 2008
Messages
56
Hi,

I've got a few sub forms as datasheets imbedded in my main form.
The sub forms contain information from other tables and are related to the main form with a primary key.

Sometimes the sub forms will contain no records i.e if the client on the main form has no children there will be no records on the sub form.

Thats fine but whenever I navigate to a record where this is the case i get a message saying.

'The object does not contain the automation object "Client" '

The thing is i don't care and I don't want access informing me about it.

I've tried placing docmd.setwarnings = false in both onload and onOpen events in both the main and sub forms but i'm still getting the message.

Please help!
 
A very crude way of overcoming this problem, and most certainly not the best is to place On Error Resume Next in the OnLoad Event of the main form.
 
A very crude way of overcoming this problem, and most certainly not the best is to place On Error Resume Next in the OnLoad Event of the main form.

Hey thanks for your response, I placed the statement as suggested but the damn message keeps appearing anyway!!!
 
Then place the on error above the line that is thowing the error or build in some error trapping within that sub routine.

David
 
I'm gonna research error trapping because I don't have a clue,

Also there isn't a line of code generating the error as there is no VB in these forms
 

Users who are viewing this thread

Back
Top Bottom