473,406 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

how to link a master detail table

Hello everyone,
I'm having a bit of a problem seeying the big picture in this and I was
hoping somebody more experienced in this could help tell me if I'm
proceding right. I plan to construct a master invoice table with
client information and a linked details invoice table with line items
of all items charged.
I also plan to have a payments table of the invoices. Since the client
can make more than one payment to an invoice I need to create another
master-detail table. The master table carries the invoice id, and the
details table carries all the payments made to that invoice. But how
can I tell that the invoice has already been paid in full and stop the
user from adding more payments to it? Is there another way to do this
and I'm not seeying it? Any help would be great...
Thanks for your time,
Sergio S Bastos

Nov 13 '05 #1
1 2377
ba***********@gmail.com wrote:
Hello everyone,
I'm having a bit of a problem seeying the big picture in this and I was
hoping somebody more experienced in this could help tell me if I'm
proceding right. I plan to construct a master invoice table with
client information and a linked details invoice table with line items
of all items charged.
I also plan to have a payments table of the invoices. Since the client
can make more than one payment to an invoice I need to create another
master-detail table. The master table carries the invoice id, and the
details table carries all the payments made to that invoice. But how
can I tell that the invoice has already been paid in full and stop the
user from adding more payments to it? Is there another way to do this
and I'm not seeying it? Any help would be great...


This seems like a decent structure to me. I use it myself :-)

There is no way to technically block more entries to the payments
*table* after the total equals (or exceeds) the invoice sum. But the
spot where the user enters payments should be a form, so we have some
instruments to our disposal.
You didn't tell about your forms. I just guess there is one to enter
payments, and you have to indicate the invoice where the payment is
related to. As soon as the user chooses the invoice, your program can
quickly sum up all payments (if any) using DSum if nothing else, message
the user (did you know that 'to message' is a verb? :-) ) and even set
AllowAdditions to false. Or so.

Do yo store the total amount in the invoice record? I don't. I do store
item prices in the detail records--I don't want to have to retrieve
those from products tables, and moreover these could change over time.
So if you want to have that invoice total, a little calculation is due.

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hari | last post by:
I have got a master detail datagrid in my application. When i select a row in a master table if there are no rows in detail table for the selected row in the master table then i want to give a...
2
by: Coen | last post by:
Hello, I have a strange performance delay of about 2 sec's in moving to the next row. I use multiple forms with each master-detail table relations. The master-table displays it's table rows in...
3
by: sqlboy2000 | last post by:
Hi, I've just started playing around with master / detail pages and I'm trying to simply change the detail page displayed in the contentplaceholder control from code behind. I can't seem to find...
1
by: Gary200 | last post by:
Hello All, I bind two datagrids in a master-detail relationship successfully. What I want is to set allowNew and allowDelete disabled in both datagrid using dataview. The code like this: ...
13
by: paquer | last post by:
Ok' I have 2 tables. The first being my main table where each record has a 'FigureID' txt box. (Indexed - No duplicates) The second being my sub table where reporting is entered for these...
7
by: john | last post by:
In my form I have a master table and a details table linked 1xM. I can search through the whole parent table but I also like to be able to search through the child table fields to find parent...
0
by: Mike Wilson | last post by:
Dear group, I have an invoice entry form, which is a simple Master fields / Detail grid. The main summary information of the invoice are stored in one table in a dataset, which is bound using a...
2
by: John | last post by:
Hi I am trying to create a master/detail form. I have my master and details tables dragged onto the dataset. I have also dragged the fields from master table on the form which has created the...
1
Echooff3
by: Echooff3 | last post by:
My application utilizes a dataset with a couple of One to Many relations. If the user adds a new record and adds information to the master part of the form and adds information to the detail part of...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.