Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / January 2007

Tip: Looking for answers? Try searching our database.

Problems generating an Invoice

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Craig Armitage - 31 Jan 2007 01:07 GMT
Hi,

I would like to generate a printable invoice based on job data in my
database.. basically, i have 3 tables.. Jobs, Customers and JobsPartsUsed

Relating to this problem, the tables have the following fields..

Jobs table
----------
JobsID (pk)
CustomerID (fk)
JobReport

Customers table
----------------
CustomerID (pk)
CustomerName
CustomerAddress

JobsPartsTable
----------------
JobsPartsID (pk)
JobsID (fk)
JobsItemDescription
JobsItemCost
JobsItemQuantity

Ok, hopefully you can see that i want to generate an invoice based report
that shows the customers details at the top, then the JobReport and finally
a list of any parts used in the job.

I cant seem to get the JobsPartsTable to only show the parts related to the
JobsID.. it always shows all the parts.

How would you guys set this up?

Also, on a slightly different note, i would like to calculate the sub totals
of each of the items in the list.. is the best way to have a field called
subtotal and get it to be filled in on an changed event for the qty/cost
fields?

Thanks in advance for any help given..

Craig
Damian S - 31 Jan 2007 01:18 GMT
Hi Craig,

If it's showing all records, you need to have a link between the ID
fields...  The SQL would be something like this:

select * from Customers
inner join Jobs on Jobs.CustomerID = Customers.CustomerID
inner join  JobsParts on JobsParts.JobID = Jobs.JobID

Use report grouping to separate your Customer info, then Job info and have
the JobParts in the details section.  You can then subtotal by Job and Grand
Total overall using the sum() function in the relevant footers.

Hope this helps.

Damian.

> Hi,
>
[quoted text clipped - 40 lines]
>
> Craig
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.