View Single Post
  #2  
Old May 29th, 2010, 07:31 PM posted to microsoft.public.access.queries
KenSheridan via AccessMonster.com
external usenet poster
 
Posts: 1,610
Default Query on a subform

You can reference the parent form's ProgramID control as a parameter in the
combo box's RowSource property, e.g.

SELECT MemberID, FirstName & " " & LastName
FROM Members
WHERE ProgamID = Forms!ParentFormName!ProgramID
ORDER BY LastName, FirstName;

In the subform's Current event procedure requery the combo box with:

Me.YourComboBoxName.Requery

Ken Sheridan
Stafford, England

Jeffrey Marks wrote:
I have a form that displays an outing for members to sign up. There is
a subform where I display the members of the organization (via a combo
box), using a query to pull the current members.

Now the users would like to only show members by program. So I was
hoping to use the ProgramID field from the form to match against the
ProgramID on the member records in the subform's query. Is this
possible to talk back and forth from the form to the subform's query?
How would I do this?

Thanks

Jeff


--
Message posted via http://www.accessmonster.com