Re: Tab Form with multiple forms
- From: JvC <johnvonc@xxxxxxxxxxxxx>
- Date: Thu, 07 Aug 2008 06:20:41 -0700
Eric,
It would appear that you have a parent->child relationship between Table 1 and your tables on Tabs 2-4, however you have set up your form without this relationship. You need to:
-Make the datasource for the Main form table 1
-Recreate Subform 1 on Tab 1, using the data from the main form's recordsource. You can copy the controls from Subform 1. Now you have created the parent form.
-Get rid of Subform 1 on Tab 1
-Rebind the subforms to the main form, as Alan stated.
That should work!
John
Eric formulated on Thursday :
Perfect! That was great.
Ok now all the records populate from the forms but the Charter ID from the master form is not replicating/coping to the other child tables (Charter ID).
when you look in the child tables, all data is there except the Charter ID.
Is there a way to append or copy the Charter ID from the master form to the other sub forms on the fly, and thus record the Charter ID to the other tables?
Thank so much, I spent hours trying to get that to work and should have asked sooner.
--
Eric the Rookie
"Allen Browne" wrote:
So you have a form with a tab control with 4 pages in it.
The first page is bound to Table1, which has the Charter ID primary key.
The 2nd page contains a subform bound to Table2. With the main form open in design view, right-click the edge of the subform control, and choose Properties. Set:
Link Master Fields Charter ID
Link Child Fields Charter ID
Save the changes. Now this subform will just the records from Table2 that match the record in the main form. When you enter a new record in this subform, Access will automatically assign the Charter ID value to match the value in the main form. You don't need any code or macros.
Repeat that process for the subforms in your other 2 tab pages.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Eric" <Eric@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7580CF85-1652-445F-8E3F-B9F140B4345E@xxxxxxxxxxxxxxxx
I have 4 forms that have different information, all tied to their
corresponding tables. All 4 tables/forms have a common field (Charter ID).
Table 1 has the Primary key for this field; all others have the same field as
a foreign key not indexed. I have the relationships set to one-to-many from
Table 1.
I'm trying to pre-populate the Charter ID field to the three forms/tables...
from Form 1/table 1. This is to allow the user to start a new record in form
1, and then move through the form tabs 2-4 and the Charter ID is already
filled in and recorded in the tables 2, 3 and 4.
I have tried to use SetValue macros etc. but can't seem to get even close.
I have tried all combinations for on Open, After update, on exit etc. and
can't seem to get it.
I'll try and appreciate any and all ideas.
Form1 Primary Key Form2 Form 3 Form 4
(Charter ID) --> (Charter ID) --> (Charter ID) --> (Charter ID)
Thanks for your time.
--
Eric the Rookie
.
- Follow-Ups:
- Re: Tab Form with multiple forms
- From: Eric
- Re: Tab Form with multiple forms
- References:
- Tab Form with multiple forms
- From: Eric
- Re: Tab Form with multiple forms
- From: Allen Browne
- Re: Tab Form with multiple forms
- From: Eric
- Tab Form with multiple forms
- Prev by Date: Re: Finding name of last query run in VBA code
- Next by Date: Re: How do I eliminate double error messages
- Previous by thread: Re: Tab Form with multiple forms
- Next by thread: Re: Tab Form with multiple forms
- Index(es):
Relevant Pages
|