Form-subform linking problem from query

atisz

Registered User.
Local time
Today, 21:31
Joined
Apr 5, 2005
Messages
96
Hi,


I'm having a problem with an invoice database.
There is a main form frmOrders, from which I enter Order_ID, Customer_ID, Invoice_number, Invoice_date, ... and another form called sfrmPayments, containing the following fields: Invoice_number, Receipt_number, Data, Payed_Amount, ...
This second form is inserted as subform on the main form, the 2 are linked by the field Invoice_number.
If I want to print the invoice, there are no problems. The rptInvoice report is based on qryInvoice query, and printing the invoice for current customer from the main form is made using the following criteria in qryInvoice, for field Order_ID: [Forms]![frmOrders]![Order_ID].
I would like to do the same thing with receipts, too. I made a query called qryReceipt based on data entered from several forms, between this sfrmPayments, and I would like to use a criteria like the above one, but for the field Receipt_number.
What this criteria should be? As sfrmPayments is a subform of frmOrders, i can't do it. I tried, and i tried, but no result since this moment.
Any help is appreciated.
 
Solution found

Ok! I have found the solution for this, which is: [Forms!][MainForm]![SubForm].[Form]![FieldName].
 

Users who are viewing this thread

Back
Top Bottom