PC Review


Reply
Thread Tools Rate Thread

code worked in Access 2003, not Access 2007

 
 
scolino
Guest
Posts: n/a
 
      23rd Feb 2009
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?

 
Reply With Quote
 
 
 
 
Tom van Stiphout
Guest
Posts: n/a
 
      23rd Feb 2009
On Sun, 22 Feb 2009 19:28:00 -0800, scolino
<(E-Mail Removed)> wrote:

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


> 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?

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2003 Code Doesn't Work in Access 2007 Nika Microsoft Access Forms 3 27th Oct 2008 10:47 PM
Functions worked in Access 2003 but not in Access 2007 Tom C Microsoft Access Macros 4 16th Aug 2008 12:37 AM
Access 2003 VB Code Export Query Failing with Access 2007 user PatK Microsoft Access Queries 3 4th Dec 2007 06:20 PM
Form that worked in Access 2003 does not in 2007 =?Utf-8?B?RnJlZEZpc2hlcg==?= Microsoft Access Form Coding 0 11th Apr 2007 01:20 PM
How to open a form automatically in Access 2007 like a switchboard worked in Access 2002 Cindy H Microsoft Access 2 24th Mar 2007 11:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:29 AM.