473,554 Members | 2,301 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Two Subforms - Same Record

I have a form, primary subform and secondary subform. A tab control takes up all
the area of the primary subform. There are about 15 tabs on the tabcontrol. Each
tab contains fields from the same table. Related fields appear on each tab.
There is one field in the table that needs to be displayed at all times so I
created the secondary subform (subform to main form) to display just that one
field. Data entry is main form - secondary subform - main subform. When enter a
new record, data is first entered in the main form. Next a value is entered in
the secondary subform. Finally data entry is completed in the primary subform. A
problem occurs here. The primary subform goes to a new record rather than
staying on the same record as the secondary subform. How can I get the primary
subform to stay on the same record as the secondary record so the data entered
in the primary subform is recorded in the same record as the data that was
entered in the secondary subform.

Thanks for all help!

Steve
Nov 12 '05 #1
6 3933
On Tue, 11 May 2004 21:56:41 GMT, "Steve" <sp**@nospam.sp am> wrote:
I have a form, primary subform and secondary subform. A tab control takes up all
the area of the primary subform. There are about 15 tabs on the tabcontrol. Each
tab contains fields from the same table. Related fields appear on each tab.
WHOA. How many fields in your table!? FIFTEEN tab controls - you must
be pushing the 255 field limit, and (much more insidiously) the 2000
characters per record limit. Are you certain that your table is
properly normalized?
There is one field in the table that needs to be displayed at all times so I
created the secondary subform (subform to main form) to display just that one


It is not necessary to have a separate subform to do this, and I'd in
fact advise against it. It's perfectly possible to put this one field
on the Form *NOT* on the tab control; or, if you prefer, you can put
fifteen controls all bound to the same field, one on each tab page.
Having the same record open simultaneously on two subforms can and
will (as you have seen) get you into synchronization trouble!

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
Nov 12 '05 #2
John,

Thanks for responding! You misread my post, there's not 15 tab controls; there's
only one with 15 tabs. The table has around 60 fields so each page of the tab
control only has a couple of fields. The design of the tab control takes up all
the area of the primary subform so there's no room to put the one field outside
the tab control.

I am going to look at implementing your suggestion of fifteen controls all bound
to the same field, one on each tab page. Is there any way to put a textbox on
the main form but bind it to a field in the recordsource of the subform? Maybe
something like Forms!MyMainFor m!MySubformCont rol!MyField in the control source
property???

In the way of synchronized subforms, is there a way to make two subforms based
on the same record source always be on the same record, ie, data entry in either
subform will always record data in the same underlying record?

Thanks, John,

Steve
"John Vinson" <jvinson@STOP_S PAM.WysardOfInf o.com> wrote in message
news:1d******** *************** *********@4ax.c om...
On Tue, 11 May 2004 21:56:41 GMT, "Steve" <sp**@nospam.sp am> wrote:
I have a form, primary subform and secondary subform. A tab control takes up allthe area of the primary subform. There are about 15 tabs on the tabcontrol. Eachtab contains fields from the same table. Related fields appear on each tab.


WHOA. How many fields in your table!? FIFTEEN tab controls - you must
be pushing the 255 field limit, and (much more insidiously) the 2000
characters per record limit. Are you certain that your table is
properly normalized?
There is one field in the table that needs to be displayed at all times so I
created the secondary subform (subform to main form) to display just that one


It is not necessary to have a separate subform to do this, and I'd in
fact advise against it. It's perfectly possible to put this one field
on the Form *NOT* on the tab control; or, if you prefer, you can put
fifteen controls all bound to the same field, one on each tab page.
Having the same record open simultaneously on two subforms can and
will (as you have seen) get you into synchronization trouble!

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public

Nov 12 '05 #3
Is there any way to put a textbox on
the main form but bind it to a field in the recordsource of the subform? Maybe something like Forms!MyMainFor m!MySubformCont rol!MyField in the control source property???
the above field reference will probably work, except you may have to modify
it to
Forms!MyMainFor m!MySubformCont rol.Form!MyFiel d
fyi, if you go the "control on subform" route, you shouldn't need a separate
control for each page. in design view, drag the side of the form out away
from the edge of the tab control (this is temporary, just to give you room
to work). add a text box control in that newly opened space in the detail
section. now drag the text box over on to the tab control *without selecting
either the tab control or any specific page*. click thru your tabs and you
should see the new text box showing "thru" on every one. drag the right side
of your form back to its' original position.

hth
"Steve" <sp**@nospam.sp am> wrote in message
news:hU******** *********@newsr ead3.news.atl.e arthlink.net... John,

Thanks for responding! You misread my post, there's not 15 tab controls; there's only one with 15 tabs. The table has around 60 fields so each page of the tab control only has a couple of fields. The design of the tab control takes up all the area of the primary subform so there's no room to put the one field outside the tab control.

I am going to look at implementing your suggestion of fifteen controls all bound to the same field, one on each tab page. Is there any way to put a textbox on the main form but bind it to a field in the recordsource of the subform? Maybe something like Forms!MyMainFor m!MySubformCont rol!MyField in the control source property???

In the way of synchronized subforms, is there a way to make two subforms based on the same record source always be on the same record, ie, data entry in either subform will always record data in the same underlying record?

Thanks, John,

Steve
"John Vinson" <jvinson@STOP_S PAM.WysardOfInf o.com> wrote in message
news:1d******** *************** *********@4ax.c om...
On Tue, 11 May 2004 21:56:41 GMT, "Steve" <sp**@nospam.sp am> wrote:
I have a form, primary subform and secondary subform. A tab control takes up
all
the area of the primary subform. There are about 15 tabs on the
tabcontrol.
Eachtab contains fields from the same table. Related fields appear on each
tab.
WHOA. How many fields in your table!? FIFTEEN tab controls - you must
be pushing the 255 field limit, and (much more insidiously) the 2000
characters per record limit. Are you certain that your table is
properly normalized?
There is one field in the table that needs to be displayed at all times
so Icreated the secondary subform (subform to main form) to display just

that one
It is not necessary to have a separate subform to do this, and I'd in
fact advise against it. It's perfectly possible to put this one field
on the Form *NOT* on the tab control; or, if you prefer, you can put
fifteen controls all bound to the same field, one on each tab page.
Having the same record open simultaneously on two subforms can and
will (as you have seen) get you into synchronization trouble!

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public


Nov 12 '05 #4
Tina,

Thanks for responding!

That's a great idea for the textbox!!

I haven't been able to get the field reference to work!

Steve
"tina" <no****@address .com> wrote in message
news:m6******** *************@b gtnsc05-news.ops.worldn et.att.net...
Is there any way to put a textbox on
the main form but bind it to a field in the recordsource of the subform?

Maybe
something like Forms!MyMainFor m!MySubformCont rol!MyField in the control

source
property???


the above field reference will probably work, except you may have to modify
it to
Forms!MyMainFor m!MySubformCont rol.Form!MyFiel d
fyi, if you go the "control on subform" route, you shouldn't need a separate
control for each page. in design view, drag the side of the form out away
from the edge of the tab control (this is temporary, just to give you room
to work). add a text box control in that newly opened space in the detail
section. now drag the text box over on to the tab control *without selecting
either the tab control or any specific page*. click thru your tabs and you
should see the new text box showing "thru" on every one. drag the right side
of your form back to its' original position.

hth
"Steve" <sp**@nospam.sp am> wrote in message
news:hU******** *********@newsr ead3.news.atl.e arthlink.net...
John,

Thanks for responding! You misread my post, there's not 15 tab controls;

there's
only one with 15 tabs. The table has around 60 fields so each page of the

tab
control only has a couple of fields. The design of the tab control takes

up all
the area of the primary subform so there's no room to put the one field

outside
the tab control.

I am going to look at implementing your suggestion of fifteen controls all

bound
to the same field, one on each tab page. Is there any way to put a textbox

on
the main form but bind it to a field in the recordsource of the subform?

Maybe
something like Forms!MyMainFor m!MySubformCont rol!MyField in the control

source
property???

In the way of synchronized subforms, is there a way to make two subforms

based
on the same record source always be on the same record, ie, data entry in

either
subform will always record data in the same underlying record?

Thanks, John,

Steve
"John Vinson" <jvinson@STOP_S PAM.WysardOfInf o.com> wrote in message
news:1d******** *************** *********@4ax.c om...
On Tue, 11 May 2004 21:56:41 GMT, "Steve" <sp**@nospam.sp am> wrote:

>I have a form, primary subform and secondary subform. A tab control takes up
all
>the area of the primary subform. There are about 15 tabs on the

tabcontrol.
Each
>tab contains fields from the same table. Related fields appear on each

tab.
WHOA. How many fields in your table!? FIFTEEN tab controls - you must
be pushing the 255 field limit, and (much more insidiously) the 2000
characters per record limit. Are you certain that your table is
properly normalized?

>There is one field in the table that needs to be displayed at all times so I >created the secondary subform (subform to main form) to display just that one
It is not necessary to have a separate subform to do this, and I'd in
fact advise against it. It's perfectly possible to put this one field
on the Form *NOT* on the tab control; or, if you prefer, you can put
fifteen controls all bound to the same field, one on each tab page.
Having the same record open simultaneously on two subforms can and
will (as you have seen) get you into synchronization trouble!

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public



Nov 12 '05 #5
On Wed, 12 May 2004 06:02:58 GMT, "tina" <no****@address .com> wrote:
drag the text box over on to the tab control *without selecting
either the tab control or any specific page*. click thru your tabs and you
should see the new text box showing "thru" on every one.


great idea Tina! Turning what is often seen as a "bug", or at least an
undesirable feature, to good use!
John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
Nov 12 '05 #6
thank you, John! <humble bow and big smile>
i've often added command buttons that way, such as Close, Quit, maybe
Reports - anything I want to be seen (and have the same use) on more than
one tab. if there are certain tabs I don't want the control seen on, i
hide/show it in the tab control's OnChange event with a Select Case
statement.
i guess once in a great, great while it pays to not know something is a bug!
<g>
"John Vinson" <jvinson@STOP_S PAM.WysardOfInf o.com> wrote in message
news:65******** *************** *********@4ax.c om...
On Wed, 12 May 2004 06:02:58 GMT, "tina" <no****@address .com> wrote:
drag the text box over on to the tab control *without selecting
either the tab control or any specific page*. click thru your tabs and youshould see the new text box showing "thru" on every one.


great idea Tina! Turning what is often seen as a "bug", or at least an
undesirable feature, to good use!
John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public

Nov 12 '05 #7

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

Similar topics

3
3997
by: Evil | last post by:
Hi, i have a problem with a treeview and some subforms in MS Access97. I have a form with a treeview on the left side which lets me navigate thru some projects. Then on the right side, i have several Tabs, each with a subform. Now, my tree view nodclick code goes like: sProjNum = me.tvwX.SelectedItem.Key
0
1771
by: Arnold | last post by:
Hi there, I have a form to organize bottles in mind, but am unsure if it will work. Here's some background info: Mainform = frmProduct, which contains fields for pricing, status, etc. of complete bottles, as well as an image control for a thumbnail of a complete product (bottle + cap). The mainform has 2 subforms that must be visible...
1
2978
by: M Wells | last post by:
Hi All, I am developing an Access 2003 project application with the back end in SQL Server 2003. I have a master form that tracks projects, and several subforms on it that track various aspects of the project. On the masterform I have two unbound listboxes that I populate with information regarding the current record in one of the...
2
2990
by: Jack | last post by:
Hi all, I searched the archives and found everyone happy with Stephen's MouseWheel On/Off code except for those with subforms. Stephen's page indicates that he has added code to handle subforms ("Bug Fix for SubForms with ScrollBars. Bug fix for SubForms without visible ScrollBars.") - BUT I still can't get it to work on my app with my...
0
2229
by: Jack | last post by:
Gday everyone, I'm dearly hoping Stephen Lebans is going to update his masterpeice to stop the mouse wheel scrolling to work on subforms *he has indicated this to me but of course beggers can't be choosers here so I have no idea when this would be done*. I'm just wondering if anyone has gotten around the problem some other way? ...
0
2687
by: misscrf | last post by:
I am currently working on a database, in 3rd normal form, which is for candidates who apply for a job with the law firm that I workd for. My issue is with good form design. I have a main form. Then I have 3 pages on a tab control ( 4 if the type of candidate validates that is is to be shown) Each page has a subform. The subforms can...
5
2078
by: Don Do | last post by:
Ok, this is my 2nd ever post. 1st one was solved quickly. Thanks. Now I'm stuck again. My mdb has a main form with 3 subforms. Each tied to the succeeding by single autonumberID/foreign fields. Each of the subforms is in continuous form format. The forms seems to work well as far as viewing or adding records in each of the subforms,...
1
1474
by: napstar | last post by:
I have a subform and I would like to set its recordsource based on a combo box selection.how do i do that. Private Sub Combo2_Change() Dim CourseName As String Dim queryStr As String 'set query string queryStr = "'SELECT * CoursesTable.CourseName FROM CoursesTable WHERE CoursesTable.CourseName = "
4
6034
by: Harlequin | last post by:
I have a question concerning the need to trigger events within a "child" subform which is itself enbedded within a master "parent" form and which is accessible via a tab in the parent form. Becuase this is all very difficult to explain in words, please bear with me as I endevour to explain what it is I am trying to do. It would be helpful if I...
9
16793
by: frys | last post by:
Access 2003 Windows XP I have a form that is for tracking attendance at programs. the main form is the program information, and the sub form is the attendance information. I have 5 homes and need to switch between each home at any given time. Currently i use a tab form with 5 subforms attached filtering the attendance data for each home....
0
7612
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...
0
8053
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...
1
7576
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...
0
7895
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6163
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5443
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5165
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2027
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
853
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...

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.