"Expression you entered refer to an object that doesn't exist or is closed" error on subform

S

silkworm

I get a "Expression you entered refer to an object that doesn't exist
or is closed" error on the following code.


Me.subCurrentSamplesfrm.Form.RecordSource = SQLstatement


subCurrentSamplesfrm is a sub form inside a main form and this code is
run after a user provided some input.

The strange thing is that I lifted the code from another access
database of ours and it worked fine there.

Can anyone shed some light on this?

Thanks
 
B

Biz Enhancer

Hi,

Just guessing here, but I would suggest you look at the SQL statement. If
you copied the SQL statement from another database you need to ask if all the
objects that the SQL statement refers to are in the new database.

Regards,

Nick
 
B

Biz Enhancer

Unless you 100% confident on the SQL statement, I suggest you post that and
any other action events that are triggered by form events. otherwise we don't
have a lot to go on and it is little more than guessing games.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top