Getting Multiple Order Items to report (1 Viewer)

CallumMascall

New member
Local time
Today, 20:54
Joined
Sep 18, 2020
Messages
15
Hi there, I have an order tracking database (its the pre-made Goods Database by microsoft but modified slightly to my needs)
I have the purchase order form with the subform that allows for multiple products to be selected from the selected supplier
I am making a report that will be an order form to send to the supplier with the items, quantities, prices etc. I can get normal records from the form to the report fine. However i am confused as to how i can get all of the items from the subform into the report as they are under the same field name in the tables.

Is anyone able to tell me how i would go about doing this?
All of the items from the subform have the order number attached to them from the main form so they are associated in that way.
for example i order a wheel bearing, brakes, engine mount, etc from 1 supplier. This is all on one form with those items on the subform, how can i get all of these different items in the subform for that order number onto the one report to send as an order form to the supplier?
My problem is because the items will be under the same field name in the subform's table, im unsure how to go about getting the multiple different items onto the report
Sorry if my wording is hard to understand, its hard to explain XD
 
Last edited:

Minty

AWF VIP
Local time
Today, 20:54
Joined
Jul 26, 2013
Messages
10,355
Normally you would put the order header in the report header and the order lines in the detail section.
Use the report grouping to make the sections contain the correct items.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:54
Joined
May 7, 2009
Messages
19,169
create first a Query that you can use as Rowsource of a Report.

select * from yourTable Where [orderNumberField] = [Forms]![yourFormName]![ordernumberTextbox];

create a Report using the Query you made as the Record Source.

you can then Email this report using Docmd.SendObject.
 

MushroomKing

Registered User.
Local time
Today, 13:54
Joined
Jun 7, 2018
Messages
100
If you end up with 2 queries, make a UNION query.

What happens if you just copy past you form and subform onto your report?
I did this a few times and it works with subforms also i recon.
 

Users who are viewing this thread

Top Bottom