473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Extended question on tabbed pages--Rick please help

kev
Hello,

I posted a question a while ago on tabbed pages, how to set it to
invisible when the text box is empty.It was answered by Rick and the
code ran perfectly. However, i tried using the same code for another
scenario and it gives me compile error:method or data member not found.

My scenario is i have a nested tab page.My main tabbed page has 4 tabs,
About, SafetyLevel1,SafetyLevel2,SafetyLevel3. Inside this main, i
created a subform(which is another tab page that contains many tabs)
for each main tab namely SafetyLevel1,SafetyLevel2,SafetyLevel3.

What i want to achieve is that, when the subform which is the inner tab
contains no records at all, the main tab page which is Safety Level one
to be disabled/appear invisible.

My main tab pages are pgSL1,pgSL2,pgSL3 and the tab control is tabMain.
The corresponding subform for each tab is
frmDisplaySL1,frmDisplaySL2,frmDisplaySL3.

Please advise me on what to do i am at a lost here.
Firstly, i did not prefer to create a nested tabbed page however the
idea of placing three command buttons at the bottom of the form as
Safety1, Safety2,Safety3 does not seem much user friendly as users need
to click each button in order to see each level.

Any suggestion is very much welcomed. Thanks again.

Jan 16 '07 #1
3 2737
kev wrote:
Hello,

I posted a question a while ago on tabbed pages, how to set it to
invisible when the text box is empty.It was answered by Rick and the
code ran perfectly. However, i tried using the same code for another
scenario and it gives me compile error:method or data member not
found.

My scenario is i have a nested tab page.My main tabbed page has 4
tabs, About, SafetyLevel1,SafetyLevel2,SafetyLevel3. Inside this
main, i created a subform(which is another tab page that contains
many tabs) for each main tab namely
SafetyLevel1,SafetyLevel2,SafetyLevel3.

What i want to achieve is that, when the subform which is the inner
tab contains no records at all, the main tab page which is Safety
Level one to be disabled/appear invisible.

My main tab pages are pgSL1,pgSL2,pgSL3 and the tab control is
tabMain. The corresponding subform for each tab is
frmDisplaySL1,frmDisplaySL2,frmDisplaySL3.

Please advise me on what to do i am at a lost here.
Firstly, i did not prefer to create a nested tabbed page however the
idea of placing three command buttons at the bottom of the form as
Safety1, Safety2,Safety3 does not seem much user friendly as users
need to click each button in order to see each level.

Any suggestion is very much welcomed. Thanks again.
What event needs to make this decision? When the main form is opened? When you
navigate between records in the main form? Assumining the latter you use the
Current event of the main form to test the RecordCount of the subform's
Recordset. When zero you can hide the tab page on the main form, but you will
first have to set focus to a control NOT on that tab page.

If Me.SubformControlName.Form.RecordsetClone.RecordCo unt = 0 Then
Me.SomeControl.SetFocus
Me.tabMain.Pages("pgSL1").Visible = False
End If

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jan 16 '07 #2
kev
Hi Rick,

Let me explain in detail here. In the main form, i have placed an
unbound combo box cboID in which it lists all the ID's available. When
u make a selection, the corresponding records are displayed in the 4
main tabbed pages:About, SafetyLevel1,SafetyLevel2,SafetyLevel3.

Under each tab, there is a subform which is made of a tabbed
page.Generally, d navigation as below:
tabMain/pgSL1/frmDisplaySL1
(SUBFORM)/tab1/pgGeneral,pgAccess,pgElectrical (txtchemical is the
first control)
tabMain/pgSL2/frmDisplaySL2(SUBFORM)//tab2/pgFire,PgSafety(txtseismic
is the first control)
tabMain/pgSL3/frmDisplaySL3(SUBFORM)//tab3/pgRadiation,pgVentilation
(txtpunch is the first control)

You have provided me the code below:
If Me.SubformControlName.Form.RecordsetClone.RecordCo unt = 0 Then
Me.SomeControl.SetFocus
Me.tabMain.Pages("pgSL1").Visible = False
End If

I am not sure SubformControlName. stands for? is it supposed to be the
subform's name?
Me.SomeControl? what does it refer to?

I am really at wits end here, please help.

Can i email you personally?

Thanks a lot.

Rick Brandt wrote:
kev wrote:
Hello,

I posted a question a while ago on tabbed pages, how to set it to
invisible when the text box is empty.It was answered by Rick and the
code ran perfectly. However, i tried using the same code for another
scenario and it gives me compile error:method or data member not
found.

My scenario is i have a nested tab page.My main tabbed page has 4
tabs, About, SafetyLevel1,SafetyLevel2,SafetyLevel3. Inside this
main, i created a subform(which is another tab page that contains
many tabs) for each main tab namely
SafetyLevel1,SafetyLevel2,SafetyLevel3.

What i want to achieve is that, when the subform which is the inner
tab contains no records at all, the main tab page which is Safety
Level one to be disabled/appear invisible.

My main tab pages are pgSL1,pgSL2,pgSL3 and the tab control is
tabMain. The corresponding subform for each tab is
frmDisplaySL1,frmDisplaySL2,frmDisplaySL3.

Please advise me on what to do i am at a lost here.
Firstly, i did not prefer to create a nested tabbed page however the
idea of placing three command buttons at the bottom of the form as
Safety1, Safety2,Safety3 does not seem much user friendly as users
need to click each button in order to see each level.

Any suggestion is very much welcomed. Thanks again.

What event needs to make this decision? When the main form is opened? When you
navigate between records in the main form? Assumining the latter you use the
Current event of the main form to test the RecordCount of the subform's
Recordset. When zero you can hide the tab page on the main form, but you will
first have to set focus to a control NOT on that tab page.

If Me.SubformControlName.Form.RecordsetClone.RecordCo unt = 0 Then
Me.SomeControl.SetFocus
Me.tabMain.Pages("pgSL1").Visible = False
End If

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jan 17 '07 #3
kev wrote:
Hi Rick,

Let me explain in detail here. In the main form, i have placed an
unbound combo box cboID in which it lists all the ID's available. When
u make a selection, the corresponding records are displayed in the 4
main tabbed pages:About, SafetyLevel1,SafetyLevel2,SafetyLevel3.

Under each tab, there is a subform which is made of a tabbed
page.Generally, d navigation as below:
tabMain/pgSL1/frmDisplaySL1
(SUBFORM)/tab1/pgGeneral,pgAccess,pgElectrical (txtchemical is the
first control)
tabMain/pgSL2/frmDisplaySL2(SUBFORM)//tab2/pgFire,PgSafety(txtseismic
is the first control)
tabMain/pgSL3/frmDisplaySL3(SUBFORM)//tab3/pgRadiation,pgVentilation
(txtpunch is the first control)

You have provided me the code below:
If Me.SubformControlName.Form.RecordsetClone.RecordCo unt = 0 Then
Me.SomeControl.SetFocus
Me.tabMain.Pages("pgSL1").Visible = False
End If

I am not sure SubformControlName. stands for? is it supposed to be the
subform's name?
Me.SomeControl? what does it refer to?

I am really at wits end here, please help.
A subform is a form hosted inside another form and it is contained within a
subform control on the parent form. If you used drag and drop or the wizard to
create the subform then the subform control will have the same name as the form
it is hosting (usually), but that is not guaranteed. The proper syntax to refer
to "stuff" on the subform is to use the Form property of the subform control.
The name of the form inside the subform control does not come into play at all.

In Access 97 there was an obvious difference between the subform control and the
form it contained. Then they "improved" this in Access 2000 and newer users
have been confused ever since.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

Jan 17 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: CyberEeyor | last post by:
I can launch the help viewer with no problem, but I want it to start on a particular page and not the default page. According the the 1.4 docs you can download, this should do the trick ...
1
by: Jim Hubbard | last post by:
I'd love to see a VB.Net 2.0 example of a tabbed interface. It could be a notepad-type or browser-type application....doesn't matter. What would be great is an example that incorporated a custom...
14
by: Mac via DotNetMonster.com | last post by:
Hi all, As some of you would know from my previous posts that I am rewriting our Unix based system into .Net with a MDI interface. Recently I have added a tab control to the top of the MDI...
0
by: kev | last post by:
Hello, I posted a question a while ago on tabbed pages, how to set it to invisible when the text box is empty.It was answered by Rick and the code ran perfectly. However, i tried using the same...
0
NeoPa
by: NeoPa | last post by:
Originally posted by Missinglinq: The first thing to remember is that Tabbed Pages are all part of a single form; think of it as a really long form turned on its side and folded on itself. Because...
1
by: cryptotech2000 | last post by:
What I am looking to do is create an if then statement for a particular access query, here are the facts Tables used Mainframe Report List Fields Within the table that are used for the if...
11
by: AndyM | last post by:
Hi, I have a curious problem that is causing me large amounts of grief and is steadily turning me grey. Hopefully you guys can help. I have a Master table that contains a CustomerID (as well as...
0
by: ooneguy | last post by:
I'm trying to write a java gui program that contains 3 different tabbed pane, 1 tabbed pane consists JComboBox. When i choice using JComboBox, the result will be shown because I using actionListener...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.