dmcafee at pacbell.net
dmcafee at pacbell.net
Fri Mar 4 15:42:01 CST 2005
There shouldn't be anything different here. On the parent form, create the combo, and set its rowsource to something like: SELECT OwnerID, Owner FROM tblOwners ORDER BY Owner ASC; Then as a quick test, to see if this is what you want, forget the subform for just a few minutes. Add a listbox to your parent form. Set the listbox rowsource to something like: SELECT * FROM tblHotels WHERE OwnerID = Forms![yourParentForm]![cboYourComboBoxNameHere] In the after update event of the combobox, place the following code: Me.listbox1.Requery Does this work? If so, then create you subform, set its recordsource to that of the Hotel Table (or Query) then clicking on the subform which is placed on the Parent Form, you should be able to select OwnerID as your Parent/Child Linking fields HTH David McAfee -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Martin Caro Sent: Friday, March 04, 2005 1:02 PM To: Access Developers discussion and problem solving Subject: [AccessD] Back to Front Hi folks What's the simplest way to do the following... I have a table of hotels 1:M with a table of owners. (HotelID is my primary/foreign key) I want to select an owner from the owner table and for as many times as that owner appears in the child table, list (in a subform), the related hotels in the parent table. I'm OK with the mechanics its just that it's back to front from normal and it's the wrong end of the week (recursion?). Ta Martin -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com