TabControl Syntax

Posted on 2008-06-18
Last Modified: 2011-10-19
This is Access VBA 2003
What would be the correct syntax of this statement?

1. Main Form is frmMaintenance
2. TabControl name-- TabControl
3. Page name[ Roll_YieldException]
4. field [text1]

If IsNull(Forms!frmMaintenance.TabControl.Pages.[Roll_YieldException].[text1]) Then

Any help would greatly be appreciated!
Question by:ca1358
  • 4
  • 3
LVL 76

Expert Comment

ID: 21817769
You can address the control from the form. You don't need to specify the container.

strText = Forms!frmMaintenance!text1.text


Author Comment

ID: 21821972
It didnt work - it gave me runtime error 2465 Maintenance cant find the field "text1" referred to in your expression.

Any other suggestions would be appreciated.
Thank you.

Author Comment

ID: 21946231
I still need a answer to my question.
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

LVL 76

Expert Comment

ID: 21946432
I have appended a database in 2000 format with a form containing a textbox on a page of a Tab control. The command button on the form adds some text to the text box. The code is shown in the snippet.
Private Sub Command5_Click()
    Text1.Text = "Hello"
End Sub

Open in new window


Author Comment

ID: 21948968
Here is my example "Cant find field"

click on Form 2

Thank you for your time!
LVL 76

Accepted Solution

GrahamSkan earned 500 total points
ID: 21949516
You forgot to mention that the control (a bound textbox called testfield) is on a subform (Form3) which is on the TabControl page which is in turn on the main form (Form2).

Address it like this:

MsgBox Forms!Form2!Form3!testfield.Text

Author Closing Comment

ID: 31468575
Thank you.

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel object stays open 19 76
Macro: print each sheet to pdf using ExportAsFixedFormat 11 48
IF ELSE Statement in Excel Macro VBA 16 65
Error with a code discussed on this page 5 16
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question