code worked in Access 2003, not Access 2007

S

scolino

I use the following code from a subform to change the recordsource of the
parent form:

Me.Parent.RecordSource = "BuckControlSwitch"
Me.Parent.Title.Caption = "Buck Control Switch"

It works on Access 2003, but on Access 2007, I get the following error:

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

It also works when compiled to mde on 2003 and run on 2007.

Is this a bug in Access 2007? Is there any way to use the parent reference
after the parent's recordsource has been programatically changed?
 
T

Tom van Stiphout

On Sun, 22 Feb 2009 19:28:00 -0800, scolino

I don't know why this ever worked but hopefully this will get you over
the hump:
Me.Parent.Caption = "Buck Control Switch"

-Tom.
Microsoft Access MVP
 

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