D
Dee
Hi all!
Well, this is a new subject - not related to the other questions I had about
a completely different report. I hope I don't take the long way around....
Here are the tables involved:
CHCompany table (for all customer companies)
CHAddress table with a one-to-many relationship with CHCompany (for address
for companies)
CHContacts table with a one-to-many relationship with CHAddress (for
contacts at each address)
Projects table with a one-to-many relationship with CHContacts (for quotes
created for each contact)
Details Section 1 with a one-to-many relationship with Projects (Line Items
for Section 1 of the quote)
Details Section 2 with a one-to-many relationship with Projects (Line Items
for Section 2 of the quote)
Details Section 3 with a one-to-many relationship with Projects (Line Items
for Section 3 of the quote)
Details Section 4 with a one-to-many relationship with Projects (Line Items
for Section 4 of the quote)
Details Section 5 with a one-to-many relationship with Projects (Line Items
for Section 5 of the quote)
Details Section 6 with a one-to-many relationship with Projects (Line Items
for Section 6 of the quote)
Details Section 7 with a one-to-many relationship with Projects (Line Items
for Section 7 of the quote)
Details Section 8 with a one-to-many relationship with Projects (Line Items
for Section 8 of the quote)
Details Section 9 with a one-to-many relationship with Projects (Line Items
for Section 9 of the quote)
Details Section 10 with a one-to-many relationship with Projects (Line Items
for Section 10 of the quote)
(most of the time there are only 1-3 sections)
QID is the primary key for the Projects table which is linked in all of the
details tables.
I created it this way because the salesman wanted to be able to create
various sections of a quote with a title for each section and a comments
section for each Section in case they want to provide Options. For example,
they quote 1 system (maybe the cheapest option) as option one, and a second
option to that may be higher, but better on the same quote.
I didn't know how to do that all in one table. Right now, I have the
section titles in the Project tables (Section 1 title, Section 2 title, etc)
and the same for the Comments section (CommentsSec1, CommentsSec2, etc) so
as not to repeat the title in every line item of the Details Table.
Due to this, I have to create 10 subforms to enter the data (6 on 1 main
form and the other four on a second form becuase Access only allows 7
subforms. The same holds true for the Quote Report itself. Also, there is
a Quote List report to create a quote at list price; a Quote Discount Report
to create a quote at a discounted price. In actuality, the calculations are
done on the subreports, not the main report. I had thought about creating a
report that changes it RecordSource at runtime depending on the options
chosen on a form with option buttons through VBA code that I found in an
Access Book. This would work if the information being changed was on a main
report, but is on 6/7 subreports.... for the first Quote. Could a union
query help to get them all on one subform to be able to this without too
much trouble?
Is there a better way to do this? Is there a better way than having 10
Detail Sections (because I would love not to have to have so many detail
tables.....? Please help.
Thanks,
Dee
Well, this is a new subject - not related to the other questions I had about
a completely different report. I hope I don't take the long way around....
Here are the tables involved:
CHCompany table (for all customer companies)
CHAddress table with a one-to-many relationship with CHCompany (for address
for companies)
CHContacts table with a one-to-many relationship with CHAddress (for
contacts at each address)
Projects table with a one-to-many relationship with CHContacts (for quotes
created for each contact)
Details Section 1 with a one-to-many relationship with Projects (Line Items
for Section 1 of the quote)
Details Section 2 with a one-to-many relationship with Projects (Line Items
for Section 2 of the quote)
Details Section 3 with a one-to-many relationship with Projects (Line Items
for Section 3 of the quote)
Details Section 4 with a one-to-many relationship with Projects (Line Items
for Section 4 of the quote)
Details Section 5 with a one-to-many relationship with Projects (Line Items
for Section 5 of the quote)
Details Section 6 with a one-to-many relationship with Projects (Line Items
for Section 6 of the quote)
Details Section 7 with a one-to-many relationship with Projects (Line Items
for Section 7 of the quote)
Details Section 8 with a one-to-many relationship with Projects (Line Items
for Section 8 of the quote)
Details Section 9 with a one-to-many relationship with Projects (Line Items
for Section 9 of the quote)
Details Section 10 with a one-to-many relationship with Projects (Line Items
for Section 10 of the quote)
(most of the time there are only 1-3 sections)
QID is the primary key for the Projects table which is linked in all of the
details tables.
I created it this way because the salesman wanted to be able to create
various sections of a quote with a title for each section and a comments
section for each Section in case they want to provide Options. For example,
they quote 1 system (maybe the cheapest option) as option one, and a second
option to that may be higher, but better on the same quote.
I didn't know how to do that all in one table. Right now, I have the
section titles in the Project tables (Section 1 title, Section 2 title, etc)
and the same for the Comments section (CommentsSec1, CommentsSec2, etc) so
as not to repeat the title in every line item of the Details Table.
Due to this, I have to create 10 subforms to enter the data (6 on 1 main
form and the other four on a second form becuase Access only allows 7
subforms. The same holds true for the Quote Report itself. Also, there is
a Quote List report to create a quote at list price; a Quote Discount Report
to create a quote at a discounted price. In actuality, the calculations are
done on the subreports, not the main report. I had thought about creating a
report that changes it RecordSource at runtime depending on the options
chosen on a form with option buttons through VBA code that I found in an
Access Book. This would work if the information being changed was on a main
report, but is on 6/7 subreports.... for the first Quote. Could a union
query help to get them all on one subform to be able to this without too
much trouble?
Is there a better way to do this? Is there a better way than having 10
Detail Sections (because I would love not to have to have so many detail
tables.....? Please help.
Thanks,
Dee