Design - Parent/Child

S

SAC

I have Bill To Companies which pay bills for several Customer so that many
customers can have their bills paid by one Bill To Company.

I want to be able to have a customer form with a tab for the Bill To
Address. So essentially I'm looking up the child and seeing the parent.

The Child (tblCustomer) has a field in it called BillToKey and the Parent
(tblBillTo) has a field in it called KEY.

I'm so used to making a form woth the Parent at the top and the child
records in like a datasheet view subform.

Can someone help me withe concept of a customer form with a tabbed form
showing the Bill To Address?

Thanks. Can't seem to get my mind around this today.
 
A

Allen Browne

What I suggest you do is to place the customers and the bill-to companies in
the one table. This way, you will be able to bill a customer who pays their
own bills, but also bill customers who pay through someone else.

(I am assuming that a customer pays all their bills through one company -
not some through bill-to company number 1, and others through bill-to
company number 2.)

So, your Client table will have fields like this:
ClientID AutoNumber primary key.
ClientName Text name of this customer
BillToID Number
Address Text
...

Now you enter your customers and the Bill-To companies. Each one gets a
ClientID. If Client 32 pays their own bills, then you choose 32 as their
BillToID. If 64 is a bill-to company, and client 17 uses them, then client
17's BillToID is 64.

If you really want to interface these as 2 distinct things, add another
field such as ClientTypeID, where the value 1 means it's a regular customer
and the value 2 means it's a BillTo company. You can even create separate
forms for them if you wish, using the Default Value of the hidden text box
for ClientTypeID so the value gets entered correctly on the 2 forms.

In the customers form, you use a combo box for the BillToID.

In the Bill-To companies form, you can have a subform listing the names of
the companies that they pay for. Set the properties of this subform control
so the correct companies show in the subform:
Link Master Fields: ClientID
Link Child Fields: BillToID
 

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