Tab Control Problem

I'm just wondering how I can add controls to tab control pages that
are bound to fields from different tables. I have 3 tables (road,
track and gym) with similar named fields and I want to create a tab
page for each table. Unfortunately, my tab control form only allows me
to view and set controls for one table. So even though I might have a
control bound to a field from table 'road', the information i enter
goes to the table 'track' because that is the default table for the
tab control form.  My manual says I should be able to send and view
info from different tables using tab control but I can't seem to get
it to do so.  Is the only solution to create a query that combines all
fields from each table??? Seems to defeat the purpose of a tab control
form then. Please help.

Patrick
0
trekgoes2malaysia
12/16/2007 6:47:57 AM
access.formscoding 7493 articles. 0 followers. Follow

2 Replies
849 Views

Similar Articles

[PageSpeed] 55

A form can only be bound to a single table/query.  So, unless you use a 
subform on the different pages of your tab control, you are limited to using 
a query as the recordsource for your form if you want to get all the fields 
from multiple tables.  A possible problem here is that a query which 
combines several tables may not be an updatable query (see 
http://allenbrowne.com/ser-61.html for reasons why a query may not be 
updatable).  If your query combining multiple fields (perhaps with the same 
field names) from different tables is updatable, then you will be able to 
place bound controls on different tab pages which are bound to different 
tables in the form's recordsource query; fields with the same name in their 
underlying table will be differentiated by requiring an alias in the query, 
to establish that differentiation.

The common solution to this situation is to use subforms on each of the 
separate tab pages, and use a parent/child link to link each of these to the 
same parent field in the first tab page, which will be based on a table 
which contains the "master" primary field.  If your tables contain a common 
primary key field, this is easy to do - simply set the master/child fields 
for each subform.  If there is no common primary field, you will need to 
leave the subforms unbound, and set their recordsource via VBA code for each 
table according to their relationship to the recordset for the main form.

HTH,

Rob


<trekgoes2malaysia@hotmail.com> wrote in message 
news:e0ad13f9-ccaa-4f7f-ab3f-a756f7dc2a8e@i29g2000prf.googlegroups.com...
> I'm just wondering how I can add controls to tab control pages that
> are bound to fields from different tables. I have 3 tables (road,
> track and gym) with similar named fields and I want to create a tab
> page for each table. Unfortunately, my tab control form only allows me
> to view and set controls for one table. So even though I might have a
> control bound to a field from table 'road', the information i enter
> goes to the table 'track' because that is the default table for the
> tab control form.  My manual says I should be able to send and view
> info from different tables using tab control but I can't seem to get
> it to do so.  Is the only solution to create a query that combines all
> fields from each table??? Seems to defeat the purpose of a tab control
> form then. Please help.
>
> Patrick 


0
Rob
12/16/2007 11:41:48 AM
On Dec 16, 7:41 pm, "Rob Parker"
<NOSPAMrobppar...@optusnet.com.au.REMOVETHIS> wrote:
> A form can only be bound to a single table/query.  So, unless you use a
> subform on the different pages of your tab control, you are limited to using
> a query as the recordsource for your form if you want to get all the fields
> from multiple tables.  A possible problem here is that a query which
> combines several tables may not be an updatable query (seehttp://allenbrowne.com/ser-61.htmlfor reasons why a query may not be
> updatable).  If your query combining multiple fields (perhaps with the same
> field names) from different tables is updatable, then you will be able to
> place bound controls on different tab pages which are bound to different
> tables in the form's recordsource query; fields with the same name in their
> underlying table will be differentiated by requiring an alias in the query,
> to establish that differentiation.
>
> The common solution to this situation is to use subforms on each of the
> separate tab pages, and use a parent/child link to link each of these to the
> same parent field in the first tab page, which will be based on a table
> which contains the "master" primary field.  If your tables contain a common
> primary key field, this is easy to do - simply set the master/child fields
> for each subform.  If there is no common primary field, you will need to
> leave the subforms unbound, and set their recordsource via VBA code for each
> table according to their relationship to the recordset for the main form.
>
> HTH,
>
> Rob
>
> <trekgoes2malay...@hotmail.com> wrote in message
>
> news:e0ad13f9-ccaa-4f7f-ab3f-a756f7dc2a8e@i29g2000prf.googlegroups.com...
>
>
>
> > I'm just wondering how I can add controls to tab control pages that
> > are bound to fields from different tables. I have 3 tables (road,
> > track and gym) with similar named fields and I want to create a tab
> > page for each table. Unfortunately, my tab control form only allows me
> > to view and set controls for one table. So even though I might have a
> > control bound to a field from table 'road', the information i enter
> > goes to the table 'track' because that is the default table for the
> > tab control form.  My manual says I should be able to send and view
> > info from different tables using tab control but I can't seem to get
> > it to do so.  Is the only solution to create a query that combines all
> > fields from each table??? Seems to defeat the purpose of a tab control
> > form then. Please help.
>
> > Patrick- Hide quoted text -
>
> - Show quoted text -

Thanks ROb. Will use the subform route.
0
trekgoes2malaysia
12/16/2007 2:49:25 PM
Reply:

Similar Artilces:

ActiveX Controls moving upon print/printpreview
I am running Excel 2002 w/ SP3. My ActiveX controls are moving towards the left side automatically for some reason upon pressing print/print preview. Can you please help me. Read this http://support.microsoft.com/default.aspx?scid=kb;EN-US;838910 Controls move to the left of the worksheet in Microsoft Exce�l 2002 -- Regards Ron de Bruin http://www.rondebruin.nl "Steven Cheng" <StevenCheng@discussions.microsoft.com> wrote in message news:BA4DFA82-670D-4C93-9645-A5F8AB7E14D8@microsoft.com... >I am running Excel 2002 w/ SP3. My ActiveX controls are moving towards th...

Deployment manager problem 12-26-05
Hi. I have CRM 1.2 on Win2k3 SP1. And I can't import, export or publish customizations! For example, I'm trying to import customizations from xml file. From Deployment manager I click "Import customizations", then I select xml file and CRM says that "No errors fount etc." I click "Next", then "Add". Window "Locate IIS Web Servers" appears and hangs. That’s it! Now I can only drop the mmc process. The same happens when I’m trying to publish customizations. What is it? How can I solve this problem??? I found it by myself!!! The pro...

Evil combo box resizing problem
I use combo boxes in a resizable dialog. But I noticed that if I resize the controls (I use DeferWindowPos for flicker-free resize),and there is a matching string text in the list (for example, if the edit field contained "B", and there was "Base" string), the text in the combobox gets replaced with the matching string and the text gets selected (as if the drop-down list was opened and closed). I don't want that. How can I disable it? >I use combo boxes in a resizable dialog. > >But I noticed that if I resize the controls (I use DeferWindowPos for >...

Tab Order in a Contact Form
I created a custom form, adding both buit-in fields and custom fields to the General page. However, when I go to Layout/Tab Order, only the built-in fields that exist on the built-in Contact form show up in the list. Is there any way for me to get the other built-in and custom fields to show up in the Tab Order list? Thanks, Shannon All controls (note: not fields) should appear in the tab order, but if you put some inside a frame, that frame will have its own tab order. Select the frame, then invoked the Tab Order dialog. FYI, there is a newsgroup specifically for Outlook forms issues...

problem in retrieving data from excel report
i have reports in excel 11.0 ver on one of my friend computer.when he sent those files as attachments ,i could not see the data but some code was there.the version that i have is excel 9.0. could you please tell me where the problem is . Regards, kanth. kanth Could you open the files, but looks like gibberish? Have your friend send the email with attachments as "Plain Text" not RTF Gord Dibben Excel MVP On Sun, 5 Dec 2004 10:57:03 -0800, "kanth" <kanth@discussions.microsoft.com> wrote: >i have reports in excel 11.0 ver on one of my friend computer.when h...

StretchDIBits problem
Hello. I use the StretchDIBits function 5 time by second to display a 8 bits frame (800*640) in graylevel. The function return the right value 640. My problem appear after around 98000 call of this function the function called by a thread with ON_MESSAGE & PostMessage LRESULT CDisplayFrame::RefreshFrame(WPARAM wParam, LPARAM lParam){ m_stretchStatus=StretchDIBits(m_dispArea.GetDC()->m_hDC,\ 0,0,Coord.right - Coord.left, Coord.bottom - Coord.top,\ 0,0,WIDTH,HEIGHT,currentDisplayFrame, MyIH,DIB_RGB_COLORS,SRCCOPY); return (true); } If I put i...

Display problem on the SubForm
Hi, I have two bounded ComboBoxes, cbxDrName & cbxDrComment, on a SubForm (MySubForm). What I want to do is when people select a name from cbxDrName, the cbxDrComment will display a certain doctor's comments for selection. It works well with the following codes if I open the SubForm by itself. Private Sub cbxDrName_AfterUpdate() Me![cbxDrComment].Requery Me![ cbxDrComment] = "" End Sub RowSource in my cbxDrComment is SELECT tbComment.DrComment FROM tbComment WHERE (((tbComment.DrName)=[Forms]![MySubForm].[cbxDrName])); If I place MySubForm on a ...

Address book problem with update
I have office 2004 for Mac- before service pack two, I had my Entourage address book, which was accessible from Word for things like mailing merges, and which sync'd with my work exchange server. Now I have two address books (and calendars for that matter), one which says "on my computer" which is blank, and one on the exchange server, which has all my contacts. The problem is from Word I can only access the "on my computer" and it has no entries. I don't want two calendars and address books/contacts. I just want one! and I want them to sync like they used to! ...

Combine tabs from multiple workbooks into one
I was given twelve workbooks (one for each month). Each workbook has one tab. What is the fastest way to combine the twelve workbooks (thus the twelve tabs) into a single workbook? I can open each workbook and move each tab individually, I just thought there might be a more efficient way. Any ideas? Thanks for your help. Hi Alayna See http://www.rondebruin.nl/copy3.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Alayna" <Alayna@discussions.microsoft.com> wrote in message news:DCBB3B63-84D1-48BD-86D3-7F1D72E99C1C@microsoft.com... >I was given twelve workbooks...

Weird Save Problem
Dear All I have created a pivot table in Excel 2000 and have to send it to clients who have Excel 97. When I save the file the speadsheet looses some formating (which I understand is possble going from one version to another), however in this example it saves the dropdown capabilities of the PageFields but looses it for the the ColumnFields and RowFields. Only when the RowField or ColumnField is dragged to become a PageField, does the drop down exist. Is the dropdown capability of the RowField or ColumnField only available in Excel 2000? Thanks again... Alastair > Is the dropd...

CDC
I'm drawing multiple pie-shaped regions all bounded by the same elipse (so a whole pie cut up into multiple slices). The problem is that I have to draw over the center point multiple times in order to close each individual pie-shaped region. This is causing the center point to grow in size. How can I avoid this? Is there a CPen style that accomdates this? Thanks, Jeff for(int i=0;i<m_volumes;i++) { dc.MoveTo(m_center); dc.BeginPath(); dc.AngleArc(m_center.x,m_center.y,m_radius,i*m_sweepSize,m_sweepSize); dc.CloseFigure(); dc.EndPath(); dc.StrokePath(); } ...

Exchange tasks tab on domain controllers
When we were running Exchange 2K, I could add a mailbox from any domain controller, but can't now that we've migrated to Exchange 2K3. Was this a function of connection agreements in Exchange 2K/5.5? Is there any way to re-enable this functionality? Thx. Phil: Thanks much. Is it my imagination, or are details like that hard to find? P >-----Original Message----- >On the domain controllers that are not running Exchange run the Exchange 2003 CD install on them. Install the management tools option. This will enable the tabs in AD on that domain controller. And, yes, ...

Importing Data From Access Problem
I'm trying to import some query results from MS Access into Excel using the Import External Data function. Some of the queries are coming across OK, others are only bringing the column headers across and some are bringing partial data. Does anyone have any ideas why this may be happening? Thanks Helena ...

Using For....Next with Form Controls
I have got 3 label controls on a form; each label control has it own name (list below) - lbl_div_nbr_1 - lbl_div_name_1 - lbl_div_charge_1 These set of 3 labels are then repeats 3 times on the same form, with the name being the only thing that changes e.g. - lbl_div_nbr_2 - lbl_div_name_2 - lbl_div_charge_2 - lbl_div_nbr_3 - lbl_div_name_3 - lbl_div_charge_3 I would like to use a For….next statement to look through and set the values on these labels and make them visible, rather than having to write out 9 separate statements to do this, but my code below isn’t...

CRM 3.0: Outlook Contact Synch Problem
When our users synch their CRM contacts with Outlook, it transfers all of their birthdays to their calendar. Since they have so many, this is a problem, especially for PDA users. Any way to turn just this feature off without shutting off the entire contact synch? ...

Icons change on IE tabs when using tabbed browsing
I've recently begun experiencing issues with the icons assigned to a site being changed on the tabs during tabbed browsing. For example, when clicking on NOAA on my favorites bar to look at weather from the NOAA site, I began getting the Wells Fargo icon on those tabs. The icon is still okay on my favorites bar, but now consistently shows the WF icon on tabs. I tried reassigning a new icon to NOAA, and it seemed okay for a while, but now I'm back to getting WF icons on NOAA tabs. This morning I had a lot of tabs open and suddenly my Fidelity icon was replaced by the Y...

WindowProc: combobox messages problem
In my CControlBar I have overridden the virtual WindowProc. The combobox on the controlbar displays correct and behaves well in runtime. Now, I spent a couple of hours trying to get some messages that I need, using WindowProc. This is needed because CControlBar will pass everything on to the controlbar owner, and that's not what I want. WindowProc is my way to intercept those messages. I already found out that the messages are, ehm, weird: their numbers do not match on related defines in winuser.h. To give an example: WM_COMMAND, 0x0003 functions as a WM_SETFOCUS. But WM_SETFOCUS is def...

Email Tracking Tab
A gentleman I work with has his setup so he can go into his Sent Items and look at the tracking tabs on the messages. He's had this setup and working for some time now, but recently this is no longer working. He has delivery and read receipts requested for anything he sends. I can't find any logical reason why he does not have the tracking tab anymore. I thought maybe it only applied to messages sent to multiple recipients, but I sent test messages and it didn't make any difference. Did he already process the returned Exchange receipts? When they are marked as read and ...

tab not tabbing to next cell
Tab button is moving to next page, not next cell. Is there a setting for this somewhere ? Lynn, It's trying to act like Lotus 123. Tools - Options - Transition - Transition navigation keys. Turn it off. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "lynn" <anonymous@discussions.microsoft.com> wrote in message news:231f01c3a92f$c1d56290$a601280a@phx.gbl... > Tab button is moving to next page, not next cell. Is there > a setting for this somewhere ? Perfect. Thanks ! >-----Original Message----- ...

Hyphenation problem when converting from Pub 2000 to Pub 2002
I have a serious problem that I hope someone can help me with. I've just been upgraded at work from Publisher 2000 to Publisher 2002. I'm finding, to my horror, than when I open my Publisher 2000 files in Publisher 2002, all the hyphenation is gone, and thus lines of text are bumped around, everything looks screwy, etc. I've checked and double-checked my hyphenation settings and everything looks okay there. So far, the only way I've found to correct the problem of the disappearing hyphens is to go through manually line-by-line and re-hyphenate. Given that I maintain several 100...

Controling Acrobat PDFs
I am trying to find out if there is a way to control PDFs through an Excel macro. Here is the scenario: I have a folder named "Page 1" that contains 100 PDFs. I also have a folder named "Page 2" with 100 PDFs. In an Excel worksheet, I have a list of all the Page 1 file names and the corresponding Page 2 for each. I want to open each Page 1 document, insert the appropriate Page 2 document, and save them to a third folder "Page 1-2". Is this possible? Thanks in advance for any suggestions you may have. Hi I'd start searching the Adobe support homepage (...

Tab order after using pop up calendar on date field
After selecting a value in a date field by using the pop up calendar, the tab order on the screen sometimes goes to the first dollar sign ($) on the screen and tabs through each dollar sign until the last one is reached and then starts tabbing through the fields starting with the first one instead of just tabbing to the next field. This happens if the cursor was in a text or number field and the value in the field was not selected (highlighted) when the calendar button was pushed. If the date was typed in to the date field (as apposed to selected using the pop up calendar) then the su...

Controlling Instances of Excel Application with external application
I have a various instances of a robust Excel XP application running on server. They are always running (they service different clients in a ASP web application) and they perform a variety of tasks (includin reporting stats/usage to a SQL Server) and make extensive use of VB and addins. Unfortunately the applications 'hang' once in a while an logging into the server to close instances or restart them is a pain. To that end, I am attempting to write a VB or VB.Net application tha can interface with these applications (poll them, open new instance with specified paths/files, shut them ...

tab order #8
can you specify a tab order in excel? for example. can I specify the folowwing tab order: b1 b2 b3 b4 b10 b11 b12 and ofcourse how? gracias -- daolb ------------------------------------------------------------------------ daolb's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24478 View this thread: http://www.excelforum.com/showthread.php?threadid=382504 Take a look at http://www.xldynamic.com/source/xld.xlFAQ0008.html -- HTH Bob Phillips "daolb" <daolb.1raiyc_1119884723.3538@excelforum-nospam.com> wrote in message news:daolb.1raiy...

more problems with windows mail
I changed the port # for outgoing mail and it works.... but now I can't receive anything in the windows mail account. I have 1 new mail if I go directly to AOL but it doesn't come up in Windows. What do I do? Thanks again, Dave N9 for your previous help. Do you get an error message when you try to receive? If so, right-click on your error message, copy, then paste it into a reply here. We can't do much troubleshooting without the complete error message. Gary VanderMolen, Microsoft MVP (Mail) "ms" wrote in message news:39477D36-4145-45C1-B652-526E471313...