Query to make Subform show filtered record set of form (1 Viewer)

BJF

Registered User.
Local time
Today, 07:59
Joined
Feb 19, 2010
Messages
133
Hi,

I need to make a subform on my main form show 2 fields from the filtered recordset of the main form.

right now i just have the query set to mimic where the main form record is.

it is:
SELECT qryOpenOrdersByCustomer.SO, qryOpenOrdersByCustomer.Notes2
FROM qryOpenOrdersByCustomer;

what i would like to do but not sure how, is if I have the main form filtered to 5 records, i want the subform to show those 5 records in datasheet view.

Will someone please teach me how to do this!
thanks,
BJF
 

Minty

AWF VIP
Local time
Today, 11:59
Joined
Jul 26, 2013
Messages
10,355
That's not normally how you would use a subform, normally you display (multiple) related records to the record in the main form. If the five records are already displayed on the main form why would you want them to also be on the subform?
 

BJF

Registered User.
Local time
Today, 07:59
Joined
Feb 19, 2010
Messages
133
the form is used to enter a customer name, the form filters to a recordset of open orders with that customer, and then a report can be printed by pressing a button.

i need to be able to edit the notes field though before printing, so i d like to see a list of open orders in datasheet view so i can go down the list and enter notes without having to move through the recordset one by one.
 

Minty

AWF VIP
Local time
Today, 11:59
Joined
Jul 26, 2013
Messages
10,355
Okay that sort of makes sense - set your subforms data source to the be just open orders. Then in the Master and Child link field properties put the customerID field in - this will force the subform to only display open orders for the customer ID in the main form.
 

Users who are viewing this thread

Top Bottom