Form & subform in report

  • Follow


I have two tables, products and customers...
From first I call data in form (products), and from second in subform (who 
buy some product).
I have query in report, product have ID and customers in subform IOI ID.
How to in same query combine data for report from unique ID in form and IOI 
ID from subform.

Example:
I filter ID from form products by code: [Forms]![Products]![ID]
Problem is when I call some IOI ID from subform in combination with form data.
How to filter some IOI ID from subform?
0
Reply Utf 11/27/2007 8:37:01 AM

Presumably the connection between products and customers occurs when a 
customer buys a product, and that's what want the report for?

If so, you need 2 more table to handle the customer orders:
- an Orders table (fields like CustomerID, OrderDate), and
- an OrderDetails table (to handle the line items in the order.)

If that's a new concept, open the Northwind sample database that installs 
with Access. Then open the Relationships window (Tools menu.) See how the 
tables fit together. That's what you need to do.

When you have the tables in place, you will create an Orders form, with a 
subform for entering the products in that order. Again Northwind provides 
the example of such a form.

Once that's done, you can create the report to print the order in the form.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Igor G." <IgorG@discussions.microsoft.com> wrote in message
news:19D03AF6-622B-4B03-A7F1-DFAE758AC721@microsoft.com...
>I have two tables, products and customers...
> From first I call data in form (products), and from second in subform (who
> buy some product).
> I have query in report, product have ID and customers in subform IOI ID.
> How to in same query combine data for report from unique ID in form and 
> IOI
> ID from subform.
>
> Example:
> I filter ID from form products by code: [Forms]![Products]![ID]
> Problem is when I call some IOI ID from subform in combination with form 
> data.
> How to filter some IOI ID from subform? 

0
Reply Allen 11/27/2007 9:52:34 AM


1 Replies
124 Views

(page loaded in 0.038 seconds)


Reply: