Xenix
01-28-2002, 07:17 AM
I have a tab box on my main form within each tab control is a form. I have another form which appears when a certain box is clicked on my tab form "Company Inter Connects". How can I call a value from the main form into my new form which appears:
I reference the form by:
cache1 = [Forms]![MarketInterConnectQuery]![Company]
this works fine if I open the form names MarketInterConnectQuery but when it inside the tab boxes it will not find the form?
Thank you in advance
Mike
Fizzio
01-28-2002, 07:46 AM
Is MarketInterConnectQuery your main form or another subform on the mainform? It does not matter if the mainform does not have the focus but it does have to be open.
As far as copying a value it depends what you are trying to do. If you want to base your new form on the value you want to pass either create a query to base the form on with the control name in the criteria box or use the OpenArgs of the openform command.
Let us know more if this does not answer your question. http://www.access-programmers.co.uk/ubb/smile.gif
Xenix
01-28-2002, 08:08 AM
No MarketCompanyQuery is the main form. I still can't get it to work, the form is open and a small form appears when they select a link between two companies, but then the error message appears saying :
Microsoft Access can't find the Form MarketInterConnectQuery http://www.access-programmers.co.uk/ubb/frown.gif
If I run just the MarketInterConnectQuery form on it's own the InterConnectPopup form works fine, as soon as it is a sub form withing the tab buttons in my main form it shows this error?
Thank you
Mike
Pat Hartman
01-28-2002, 09:49 AM
Forms on a tab control are actually subforms. Therefore, the syntax for referencing them changes. Try including the mainform's name:
cache1 = [Forms]![YourMainFormName]![MarketInterConnectQuery]![Company]
Xenix
01-29-2002, 12:21 AM
Thank you pat that worked fine http://www.access-programmers.co.uk/ubb/smile.gif
1000 thank you's that was really doing my head in http://www.access-programmers.co.uk/ubb/smile.gif
Kind regards
Mike