[AccessD] Back to Front

Martin Caro mcaro at bigpond.net.au
Fri Mar 4 16:05:39 CST 2005


Thanks David for your procedure
Now I'm certainly on the way to a solution
Martin

----- Original Message -----
From: <dmcafee at pacbell.net>
To: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
Sent: Saturday, March 05, 2005 8:42 AM
Subject: RE: [AccessD] Back to Front


> 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
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com




More information about the AccessD mailing list