Run time Error2467

thescottsman

Registered User.
Local time
Today, 14:38
Joined
Sep 18, 2014
Messages
42
Hi all

I am running this code:

DoCmd.SetWarnings False
Me.makealterationsubform.Form.Filter = "[QuoteNumber]='" & Me.txtsalessearch.Value & "' "
Me.makealterationsubform.Form.FilterOn = True

It works and filters my subforms as I require but for some reason it os coming up with run time error 2467

Can anyone please suggest why this is?

Thanks for your help in advance
 
error numbers don't mean much - what is the description?

Also, recommend you comment out your setwarning lines until you have debugged the code
 
Hi

The error description is

The expersion you entered refers to an object that is closed or doesn't exist.

In response to the docmd.setwarnings.

I put that in to try and stop the error box occurring because if you press end on the error box it actual applies the filter as I require.
 
OK, so to check

is the quotenumber datatype text or numeric?

is makealterationsubform is the name of your subform control?

do you have any code or calculations in your subform, or you are using a calculated field either on the form or in the underlying table? The fact you still get the error message implies you do

Have you tried stepping through the code? to see which line is actually generating the error
 

Users who are viewing this thread

Back
Top Bottom