473,761 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to refer to a subform control which is on a tab control? (tabstrip)

176 New Member
This is something I haven't found about on the net, even though it seems to me like it could be a common question. The task is simple: I have a ControlName.Val ue which is on Subform which is on page 1 of a TabCtrl.

I've tried -
(I'm not using code brackets, since this is an incorrect code)
Me!TabCtrl.Form !2!Subfom.Form! NameControl.Val ue = Me.Name2.Value
and
Me!TabCtrl!2!Su bform.Form!Name Control.Value = Me.Name2.Value

What is the correct code?
Thanks.
Dec 16 '06 #1
2 11291
MMcCarthy
14,534 Recognized Expert Moderator MVP
This is something I haven't found about on the net, even though it seems to me like it could be a common question. The task is simple: I have a ControlName.Val ue which is on Subform which is on page 1 of a TabCtrl.

I've tried -
(I'm not using code brackets, since this is an incorrect code)
Me!TabCtrl.Form !2!Subfom.Form! NameControl.Val ue = Me.Name2.Value
and
Me!TabCtrl!2!Su bform.Form!Name Control.Value = Me.Name2.Value

What is the correct code?
Thanks.
You don't need to refer to the tab page just the subform

Expand|Select|Wrap|Line Numbers
  1. [Forms]![MainFormName]![SubformName].Form![NameControl] = Me.Name2
  2.  
this should do it, you don't need the .Value

Mary
Dec 16 '06 #2
missinglinq
3,532 Recognized Expert Specialist
Continuing what Mary said about not needing to refer to the tabbed page, tab pages are merely extensions, if you will, of the form. All controls on tabbed pages are referenced as they would be if they were on a regular, non-tabbed form.
Dec 16 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1839
by: Eric | last post by:
I'm currently using the TabStrip control, but am having slighly difficulties. I've managed to retrieve the Items from the TabStrip using the Items property. But how can I enforce the changes that I've made to the Tabs within the TabItemCollection retrieved from TabStrip.Items?
3
2044
by: vikaskuk | last post by:
hi all, i am using tabstrip with multipage control in asp.net. i have put some textboxes on the first tab. my requirement is that whenever user makes some changes in any of textbox and moves to next tab without saving this data he should get alert message and should be stopped on current tab itself.
1
4459
by: Pino Carafa | last post by:
I've designed an aspx page with a Tab Strip on it. The problem is that unlike some of the simpler controls like text boxes and buttons and the likes, this Tab Strip is rendered something like this: <?XML:NAMESPACE PREFIX="TSNS" /><?IMPORT NAMESPACE="TSNS" IMPLEMENTATION="/webctrl_client/1_0/tabstrip.htc" /> <TSNS:TabStrip id="tbDocInfo" tabindex="2" class="DataEntry" onClick="tbDocInfo_Click();" selectedIndex="0"...
4
6561
by: solar | last post by:
How to refer to a subform ? On my main form called FrmEmployees I have a button to open a report. I want to forbid opening the report in case the liters in the subform are 0. To this end I have build an If condition: Dim ClLiters As Control ClLiters = Forms!FrmEmployees!FrmEmployeesSub.Form!liters If IsNull(strLiters) Then
3
4145
by: Joshua Ammann | last post by:
Hi, (Using Access 2000) I have two tables, similar to Customers and Orders. (Not an exact parallel, but works for this example.) On a form showing customer data, there is a tab control. One of the tabs has a subform showing order data (in datasheet view). On the same tab there is an unbound textbox (next to the datasheet). I placed a
1
3039
by: MP | last post by:
I have a main form that has a subform which also has a subform: the main form is the first subform is the second subform is When I click on the button »AddNewSubSubRecord« (add a new record in the second subform , the code generates the message: Can't find the field »POG-03 Work Subform« reffrred to in your expression.
2
2277
by: Robert V. Hanson | last post by:
I have a user control built using the Microsoft IE Control. I declared a public variable as int32 (DefaultTab) in the user control. I can't seem to provide the correct syntax to the tabstrip property other than SelectedIndex = 1 which works but if I try SelectedIndex = DefaultTab, it fails stating that DefaultTab is not a valid value for Int32. Thanks in advance for any help!!
4
4632
by: Asim Qazi | last post by:
Hi All i m using tab strip control plz help me setting its navigation my cod is private void TabStrip1_SelectedIndexChange(object sender, System.EventArgs e) { switch (TabStrip1.SelectedIndex)
1
1331
by: Paul | last post by:
I have a MDI container form "frmParent". On that form there is a tabstrip control with 2 pages. On one of those pages there is a textbox and a button. When the user clicks on the button a child form is opened inside the container form "frmChild" which displays a datagrid. The WHERE clause in the select statement which is bound to the grid comes from the textbox on the Parent form. How do I refer to this textbox control ?
0
9554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9377
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9989
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9925
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.