Single form multiple tables

andrewhoddie

Board Regular
Joined
Dec 21, 2008
Messages
114
Hi all

I have created a single form (with a sub form with a number of tabs) what I would like to do is have one table per tab of the form to keep the data manageable.

The form is called HomelessnessApp
The first table is called Homelessness
the second table is called Access
the third table is called Priority

I currently have a couple of issues, for each of the tables I want it to use the ID from the Homelessness table to link to all of the other tables so I can easily identify which record relates to other records in tables. The ID on the homeless is the primary key, I am struggling to bring this into the other tables

the second issue I am having is that on each of the different tables I am trying to link them to the form but the only options I am getting is link to objects in the first table (Homelessness), I think the two issues could be related.

Please can anyone help or advise on a simple alternative. I don't want to restart the form as it took a lot of time getting to that stage

thanks
Andrew
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
The master table tHomelessness (& form) has field [ID] autonumber PK.
ALL the other tables will also have
an autonumber primary key, but ALSO a HomelessID that is the [ID] from t
Homelessness (but LONG, not auto) ...

t
Access
-----------
[AccessID] auto
[ID] (long)

tPriority
-----------
[PriorityID] auto
[ID] (long)


the subforms MUST have the keys bound under the form property LINK MASTER FIELD, and LINK CHILD FIELD
for the ACCESS subform
LINK MASTER FIELD, [ID]
LINK CHILD FIELD: [
ID]
(both belong to the master)

this insures the master key is locked into the child record. do this for ALL sub forms.

NOTE : IF YOU PUT TOO MANY SUB FORM ON THE MASTER FORM, YOU WILL GET AN 'OUT OF MEMORY' ERROR.
you cant put too much data on the screen at once.
I only have many sub tables but only 1 active sub form. When a user clicks on a page Tab, I swap out the recordset in the subform, to reduce memory use.
The user clicks OrderDetails, so
subform.sourceObject = "frmOrderDtls"

when
the user clicks Contacts,
subform.sourceObject = "frmContacts"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,852
Messages
6,162,431
Members
451,765
Latest member
craigvan888

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top