473,396 Members | 2,024 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.

tab controls: is using them for separate fields of one record appropriate?

Hello,

I want to separate three different groups of fields from one record. Originally I was going to add a button on a form to "drill-down" to more detail is the user wanted to see it. I relatively new at Access and VBA but have other IT experience.

I stumbled upon the tab control that gives a very nice tabbed look that people intuitively know how to use. I went ahead and created three nice-looking subforms and then assembled them into a tabbed form with three tabs. Then I realized that if I scrolled through the records to a certain one and then clicked on one of the other two tabs, the record was not "synched" with the one I was on in the original tab.

Is it possible to make this work somehow? Or am I "perverting" the use of this control? I have a 1:1 relationship between all three tabs (subforms) as they are parts of the same record. If it is possible, could someone please give me an idea on what to do? I've been sweating this for hours and hours and googling and reading but I'm lost.

Thanks in advance for any help and your time in reading this!
Dec 19 '06 #1
5 1411
MMcCarthy
14,534 Expert Mod 8TB
Hello,

I want to separate three different groups of fields from one record. Originally I was going to add a button on a form to "drill-down" to more detail is the user wanted to see it. I relatively new at Access and VBA but have other IT experience.

I stumbled upon the tab control that gives a very nice tabbed look that people intuitively know how to use. I went ahead and created three nice-looking subforms and then assembled them into a tabbed form with three tabs. Then I realized that if I scrolled through the records to a certain one and then clicked on one of the other two tabs, the record was not "synched" with the one I was on in the original tab.

Is it possible to make this work somehow? Or am I "perverting" the use of this control? I have a 1:1 relationship between all three tabs (subforms) as they are parts of the same record. If it is possible, could someone please give me an idea on what to do? I've been sweating this for hours and hours and googling and reading but I'm lost.

Thanks in advance for any help and your time in reading this!
Your subforms have to be tied to the main form by a unique field. Set the record source of the main form to a table or query containing the uniqueID/primary key that is common on all subforms and put a control on the mainform to represent this field. You can set it to invisible if you don't want the user to see it.

Now set the master child properties of each subform object to match the field above.

Mary
Dec 19 '06 #2
missinglinq
3,532 Expert 2GB
Mary's advice is correct as far as setting up subforms, but you're needlessly complicating things by using subforms to display parts of the same record! The tabbed pages of a form are simply "extensions" of the form, if you will. They are referenced exactly the same as if they were on a "one screen" form, unlike controls on subforms. Tabbed controls are the perfect answer to logically grouping data from a single record!

What you are referring to as "fields" are actually controls. In Access fields are parts of tables not forms. Simply sort your controls into logical groups and place each group on a different tabbed page (tab control) and you're done! Clicking from one tab to the next, you will always be on the same record!
Dec 19 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
Great work Linq

I misread the original question and thought the subforms were there for a reason.

Mary
Dec 19 '06 #4
Thanks Mary and missinglinq for your speedy and useful answers. Missinglinq, I did what you suggested and it worked perfectly. Mary, I will use what you advised when I have a relationship between tables. I was even wondering if I had to do a self-join for the tabbed controls but it turns out that indeed, I don't need subforms. Just plopped the controls on the various tab pages and they all show the same record.

thanks again!!
Dec 19 '06 #5
missinglinq
3,532 Expert 2GB
Glad we could help!
Dec 19 '06 #6

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

Similar topics

17
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an ADP I'm working on. Dim rs As ADODB.Recordset...
6
by: Robert | last post by:
Hello. I have been trying out the Lebans ToolTip Classes at http://www.lebans.com/tooltip.htm, to display "balloon" style help tips in a form. The classes I am using are located at...
2
by: neptune | last post by:
I have a query where each customer has an or . Sometimes both fields for a customer are populated, but if is null, then will be populated and vice versa. I have a form, , where I select a...
3
by: MLH | last post by:
I have a form, bound to a query. Its RecordSource property is a query named frmEnterLienAmounts. The form has a few bound controls and some unbound controls. The unbound controls are calculated...
3
by: Leo J. Hart IV | last post by:
OK, here's another question for the experts: I am building a multi-step (3 steps actually) form using a panel for each step and hiding/displaying the appropriate panel/panels depending on which...
22
by: Mr Newbie | last post by:
I was thinking about developing a workflow application yesterday and was musing over the different approaches than one could take in restricting specific actions on a ticket( Form ) at any said...
9
by: Alan Silver | last post by:
Hello, I have a user control which I am trying to load dynamically, but am running into problems. I think the problem is because I have two .ascx files that refer to the same .ascx.cs file. A...
3
by: google | last post by:
I'm developing an application for use within my company in Access 2003. I'm new to '03, the application I did for my former employer was in '97. The two applications have similar functionality...
15
by: Arpan | last post by:
Consider the following code which retrieves data from a SQL Server 2005 DB table & displays it in a DataGrid: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs)...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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.