Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

from, design view, error 2467 1

Status
Not open for further replies.

toryee

Technical User
Aug 14, 2003
23
US

I have a form and there is a command button and a tab control on this form. The form initially opens in normal view. When user clicks the button, the form changes itself to design view, by using docmd.openform. In the design view, a page is (supposed to be) added to the tab control.

Problem occurs when adding the page in design view. Page fails to be added and application returns error 2467: The expression you entered refers to an object that is closed or doesn't exist.

If I run the command button click event from within the VB editor, it runs fine. A page can be added without any problems.

Only when I click on the command button, that error 2467 occurs. Any suggestions?

Thanks very much.
toryee

 
Hi

The "Usual" way to achieve this is not to add the Tab Control pages at runtime, but rather to define the TabControl with a surplus of pages, initially hide the "spare" pages by setting the visible proeprty to false, then as new pages are needed, use the command button to set the visible property to true, rather than create a new page. This way you do not have to switch to design view in the current form

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top