How do I link two Sub forms?


K

Klingrap

I am trying to create a database that shows a record of payments and fees for
multiple clients. (I know it is easier to use a program like Quickbooks, but
I would rather do it myself if I can.)

Here are the tables I am using:
tblClients > ClientID - key field
tblClientBilling > BillingID - key field

I want to create a form that shows both a list of transactions for the
client, and an area to edit the existing information or add an additional
entry. I have been able to create a sub form that shows a history of
transactions for a client (a Tabular form). I also have created a data
entry sub form.

How do I link the two forms so that when I click on an entry in the Tabular
form, it will show on the Entry form for me to edit and update?

1) Can I use a split form as a sub form? If so, how do I do this?
(I have tried, and I am beginning to think that it is not possible.)

2) Should I create a Tabular/Datasheet form as a sub form of my Entry form?
If so, how do I do this?

or

3) Should I create the Entry form and the Datasheet form separately and then
have them both be sub forms of a larger form? If so, how do I do this?
 
Ad

Advertisements

A

Arvin Meyer MVP

Subforms can be linked to the main form by using the built in properties:

LinkMaster/LinkChild

They can be linked to each other by set a textbox (usually hidden) on the
main form equal the value of the primary key in the first subform, then
setting the foreign key in the second form as the LinkMaster/LinkChild to
that textbox, as in:

Forms!MainformName!TextboxName
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top