Subform in MS Access
You are not logged in. Access is limited. Login or see membership information. • Keystone Business Forum

Home » Applications » Member Forum » Technology » Post

Keystone Business Forum offers members the ability to share their thoughts in an open forum. Feel free to browse the topics and join the collaboration!

 

Meet Our Moderators!

[ « Back ] [ Print ]
Author Message
I'm Local

"ItzaProcess"

Subject: Subform in MS Access
posted Friday, July 25th 2008 @ 3:09 PM

Hello,

Trying to filter data from a subform to show only line items that reference data selected in a combo box elswhere in the form?

In other words, I have a combo box of employees. When I select an employee, I want the info in the subform to only shoe data for that employee. Currently the subform shows data for all employees.

Can anyone help with this? Though I would try here first.

Thanks!

Brian Garlick
Group Co-Administrator

"BrianG"

Subject: RE: Subform in MS Access
posted Friday, July 25th 2008 @ 4:23 PM

Try the following code:

Form_subFormName.RecordSource = ("Select * from TABLENAME where FIELDNAME = '" & Me.cboCONTROLnAME & "'")


and then I usually requery the subform to be sure it refreshes after you set the recordsource.

Form_SUBFORMNAME.Requery

Hope that helps.

I'm Local

"ItzaProcess"

Subject: RE: Subform in MS Access
posted Saturday, July 26th 2008 @ 10:44 AM

That works. Thanks Brian!

[ « Back ] [ Print ]

Subform in MS Access

Copyright 2008 Keystone Business Forum