0

I have 2 tables, CUSTOMER and ORDERS, whose common field is CUST_ID.

In addition to CUST_ID (key field), the CUSTOMER table has fields for customer info - address, phone number, etc. I have a form that displays this information.

In addition to CUST_ID (which us not a key field), the ORDER table has fields for product, quantity and total price for each order a customer makes. A customer could have multiple orders. I created a query that gives me the total cost of all orders of for each customer. What I want to do is link the result of this query to the customer info form, so the total cost, for the appropriate customer, appears with the other customer information as mentioned.

How can I link the result of this query to that form?

Thanks.

gcarterIT
  • 125
  • 1
  • 4
  • 13

1 Answers1

0

You can use DLookup as ControlSource for an unbound textbox:

=DLookup("TotalAmount","YourQuery","Cust_ID=" & Me.Cust_ID & "")

Where Cust_ID is a unique key.

Gustav
  • 53,498
  • 7
  • 29
  • 55