Hi Guys,
I was hoping one of you gurus could give me some advice. I have set up a basic database that has a customer table , orders table , join table and products table. I have created an invoice form that has customer details and then in a subform has the order ID and product ID , name , price and quantity.
I have a text box on the form to which I am trying to output the sub total to when the form is launched(quantity X price for the current order).
I was trying to create a query that will return the subtotal for an order.I had the query calculating the subtotal but I was then trying to get t the cost based on the order ID. I was then attempting to get the Order ID for the query from the open form by adding this to the criteria in the query:
[Forms]![Invoice]![invoicesubform].[Form]![Order ID]
I was then trying to use Dlookup to put the result of the query into a subtotal text box by using:
=DLookup("[cost colum from query entered here]",[the query name was entered here]")
Apologies if I am way off track here Am I doing this completely wrong or is there a better way to do this?Any advice would be greatly appreciated.
best wishes
Mark