TabControl Within A TabControl

D Willett
SilverLounger
Posts: 1728
Joined: 25 Jan 2010, 08:34
Location: Stoke on Trent - Staffordshire - England

TabControl Within A TabControl

Post by D Willett »

I have a tabctl within a tabctl.

I am working on the inner tabclt, how do I refer this expression:

Between [Forms]![frmStatus]![txtDateFrom] And
[Forms]![frmStatus]![txtDateTo]

To the outer ( parent ) form?
Cheers ...

Dave.

User avatar
HansV
Administrator
Posts: 78524
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: TabControl Within A TabControl

Post by HansV »

As long as a control is on the main form, it doesn't matter whether it is on a tab page or on a tab page within a tab page - you can always refer to it using Forms!FormName!ControlName.

It's different if the control is part of a subform.
Best wishes,
Hans

D Willett
SilverLounger
Posts: 1728
Joined: 25 Jan 2010, 08:34
Location: Stoke on Trent - Staffordshire - England

Re: TabControl Within A TabControl

Post by D Willett »

Hi Hans

I had to create the inner tab on a new form and use that as a subform within the main parent tabctl.
When I just put a tab within a tab, the pages were showing through other forms..
Cheers ...

Dave.

User avatar
HansV
Administrator
Posts: 78524
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: TabControl Within A TabControl

Post by HansV »

If you have a control on a subform, you refer to it as follows:

Forms!MainFormName!SubformName!ControlName

SubformName must be the name of the subform as a control on the main form; this is not necessarily the same as the name of the subform in the database window.
To find the control name, open the main form in design view and click once on the subform to select it. The Name property in the Other tab of the Properties window shows the control name.
Best wishes,
Hans

D Willett
SilverLounger
Posts: 1728
Joined: 25 Jan 2010, 08:34
Location: Stoke on Trent - Staffordshire - England

Re: TabControl Within A TabControl

Post by D Willett »

Got it eventually ...........

Just one thing ( related to this form ) the dates at the bottom of my graph are all out of order ie:

JUN 10 - MAY 10 - APR 10 etc etc
Cheers ...

Dave.

User avatar
HansV
Administrator
Posts: 78524
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: TabControl Within A TabControl

Post by HansV »

Try sorting the row source of the chart by the date field.
Best wishes,
Hans

D Willett
SilverLounger
Posts: 1728
Joined: 25 Jan 2010, 08:34
Location: Stoke on Trent - Staffordshire - England

Re: TabControl Within A TabControl

Post by D Willett »

I had assumed this was a built in function with the graph !

All sorted now, once again thanks Hans.
Cheers ...

Dave.