Normal Topic Very long winded question (Read 1525 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Very long winded question
Dec 24th, 2003 at 4:15pm
Print Post Print Post  
I created an application with 4 databases

1 client
2 invoices
3 line items
4 products

The client is the parent to invoices (1 client records to many invoices)
Invoices is a parent to Line items   (1 invoice to many line items)
Line Items is the parent to product (1 line item to many products)

I created a form in the client database that has all the client data and a subform that has the invoices associated to that client and the invoice form has a subform of the line items associated to that invoice so from that one form I can see the client invoices and line items.

The subforms are of the type form not table. If I try to add a table subform that has a subform I lock up the database and have to go into server admin and unlock the database (did not release with Sunlock)  I guess it makes sense that a table could not display a subform 

So what I have is the client record form with the Invoice subform  as a form that has a table subform of line items. When a search is made the client data appears the invoices show 1 at a time (or use table view Shift f6 to see them all at once)in the subform and a table with all the line items displays.

My intent is to now use @formresultsettotal and associated programming to calculate invoice totals and total owed by customer.
(Finally the question)

Do I use the @formresultsettotal and associated programming from the parent Client database form or the child form it relates to?

Also do you see any fatal floors in my thinking?

Thanks
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Very long winded question
Reply #1 - Dec 24th, 2003 at 4:40pm
Print Post Print Post  
Robert,

You're okay until you get to the part where Products is a child of Line Items. Normally, a Line Item, by nature represents one and only one Product. A single Line Item record does not neeed to point at many Product records. Your Product database should be a separate database inside your application, rather than a child of any of the other databases. Use @XUserSelect and @XLookup in Line Item to select a Product and fill in the information.

As to your question about @FormResultSetTotal, it depends on the specifics of what you are doing and where you are doing it from. Play with it until it works for you!  Smiley  Your best bet is to try it from the direct parent of the children you are trying to work with.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Very long winded question
Reply #2 - Dec 24th, 2003 at 5:05pm
Print Post Print Post  
Thanks for the help Smiley
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged