User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 456,544 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,329 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 801 | Replies: 6
Reply
Join Date: Sep 2007
Posts: 65
Reputation: Dell XPS is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Dell XPS Dell XPS is offline Offline
Junior Poster in Training

access report

  #1  
Oct 13th, 2007
ok, i need a way to make an invoice. i have a products table with the number the name and the price of all my products and need to add only the products I want on the report, not all of them but more than 1 ......
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Posts: 145
Reputation: hopalongcassidy is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 13
hopalongcassidy's Avatar
hopalongcassidy hopalongcassidy is offline Offline
Junior Poster

Re: access report

  #2  
Oct 15th, 2007
Create a table called Inventory that contains all of your products with a field called "ProdId". Create a table called DesiredProds that contains the product id's you want to select.

Use the following SQL statement to get what you want.

SELECT * FROM Inventory INNER JOIN DesiredProds ON Inventory.ProdId = DesiredProds.ProdId

Make sure that there are no duplicate ProdId's in either table or you will get duplicate records in your output.

Hoppy
Reply With Quote  
Join Date: Sep 2007
Posts: 65
Reputation: Dell XPS is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Dell XPS Dell XPS is offline Offline
Junior Poster in Training

Re: access report

  #3  
Oct 17th, 2007
ok i have managed to do that by using VB coding to create a mulptiple value parameter query! Now I need to display and the name of the customer buying the products but access does not let me use 2 queries on one report because the tables are not connected it says !!!

Customers Table:
Customer Id:
Name
Surname:
Telephone:

Products table:
Product Code:
Description
Price:
Reply With Quote  
Join Date: Oct 2007
Posts: 145
Reputation: hopalongcassidy is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 13
hopalongcassidy's Avatar
hopalongcassidy hopalongcassidy is offline Offline
Junior Poster

Re: access report

  #4  
Oct 17th, 2007
Thinking about your original question, it really seem like what you want to do is to have two tables that represent your invoices. One table (InvoiceHeader) that contains one row for each Invoice (each row containing the Id of the Customer to whom you sold products) and a (LineItem) table containing one row for each item you sold on each invoice. The LineItem table would have the InvoiceNumber, the ProductId, the Quantity and the Price and maybe some other stuff.

What it seems like you want to do is to search the LineItem table for the desired products and for each one found, find the CustomerId in the InvoiceHeader table using the InvoiceNumber in the LineItem table. From there, find the CustomerName in the CustomerTable using the CustomerId in the InvoiceHeader table.

Do I understand what you are looking for or am I off track?

Hoppy
Last edited by hopalongcassidy : Oct 17th, 2007 at 11:47 pm.
Reply With Quote  
Join Date: Sep 2007
Posts: 65
Reputation: Dell XPS is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Dell XPS Dell XPS is offline Offline
Junior Poster in Training

Re: access report

  #5  
Oct 18th, 2007
ok i have managed to do that by using a subreport, in my invopice report, based on my customer query....
Reply With Quote  
Join Date: Sep 2007
Posts: 65
Reputation: Dell XPS is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Dell XPS Dell XPS is offline Offline
Junior Poster in Training

Re: access report

  #6  
Oct 18th, 2007
Now that i have managed to do these things I need a way to input the quantity and the discount(if any) for each product on my invoice.....
Last edited by Dell XPS : Oct 18th, 2007 at 1:54 pm.
Reply With Quote  
Join Date: Oct 2007
Posts: 145
Reputation: hopalongcassidy is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 13
hopalongcassidy's Avatar
hopalongcassidy hopalongcassidy is offline Offline
Junior Poster

Re: access report

  #7  
Oct 18th, 2007
If you want to be able to type in this information, you will need to create a form. The form should contain information to orient the person entering the information as well as fields into which the information can be entered. Also, you will need to have a "Submit" and a "Cancel" button.

Put the logic to process the input in the Submit_OnClick() method. If you are using MS Office - Professional Edition, you can generate the this method from the properties window by clicking on the "On Click" event, then click on the "...", then click on "Code Builder", then click "OK".
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 5:01 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC