forms and subforms

K

K Brooks

Hi,

I am currently having a problem dealing with forms. What
i ultimately need to do is allow a selection from a
listbox or combobox to populate a another list box, sort
of like i filter. I curently have 3 tables. One tabel
contains data about readers, the other about magazines and
the third is a routing table that shows who gets what
magazine. The primary key for the Reader Table is the
Reader ID, the primary key for the Peridical Table is
Periodical ID, and the key for the Route table is the
combination of Reader ID and Periodical ID, thus creating
a subscription or route. I need for a user to be able to
select a reader from a combo box, then have the 2nd
listbox show only the periodicals that that reader is
subscribed to be shown (from the route tabel). The tricky
part is that i need for this form to be linked directly to
the route table because i need the user to be able to
click on a certain periodical in the 2nd listbox after the
itis updated, and have the ability to delete a certain
magazine, thus unsubscribing them. I cant seem to be able
to figure out how this can be done.
 
S

Sandra Daigle

Hi K,

Take a l ook at the SelectRecords sample mdb on my website:
http://www.daiglenet.com/MSAccess.htm. This is very similar scenario,
Persons, Classes and PersonClasses. This sample has an unbound for that
uses two listboxes for selecting classes for a student. The things to look
at are the code behind the Add/Remove buttons and the query for the
Available list.

The Add button opens a recordset and adds records to the tblPersonClasses
table using the selected items in the available list.

The Delete button removes records from the tblPersonClasses table.

The key to the query in the Available list is that it is a "frustrated"
outer join showing all records in one table (Classes) that are unmatched in
the junction table (tblPersonClasses).

Look at the example and post back if you need help applying the general
concepts to your specific case.
 
S

Sandra Daigle

Hi K,

Take a l ook at the SelectRecords sample mdb on my website:
http://www.daiglenet.com/MSAccess.htm. This is very similar scenario,
Persons, Classes and PersonClasses. This sample has an unbound for that
uses two listboxes for selecting classes for a student. The things to look
at are the code behind the Add/Remove buttons and the query for the
Available list.

The Add button opens a recordset and adds records to the tblPersonClasses
table using the selected items in the available list.

The Delete button removes records from the tblPersonClasses table.

The key to the query in the Available list is that it is a "frustrated"
outer join showing all records in one table (Classes) that are unmatched in
the junction table (tblPersonClasses).

Look at the example and post back if you need help applying the general
concepts to your specific case.
 
G

Guest

Thanks for the fast response and example, it was great.
Thanks again for your help!


-----Original Message-----
Hi K,

Take a l ook at the SelectRecords sample mdb on my website:
http://www.daiglenet.com/MSAccess.htm. This is very similar scenario,
Persons, Classes and PersonClasses. This sample has an unbound for that
uses two listboxes for selecting classes for a student. The things to look
at are the code behind the Add/Remove buttons and the query for the
Available list.

The Add button opens a recordset and adds records to the tblPersonClasses
table using the selected items in the available list.

The Delete button removes records from the tblPersonClasses table.

The key to the query in the Available list is that it is a "frustrated"
outer join showing all records in one table (Classes) that are unmatched in
the junction table (tblPersonClasses).

Look at the example and post back if you need help applying the general
concepts to your specific case.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


K said:
Hi,

I am currently having a problem dealing with forms. What
i ultimately need to do is allow a selection from a
listbox or combobox to populate a another list box, sort
of like i filter. I curently have 3 tables. One tabel
contains data about readers, the other about magazines and
the third is a routing table that shows who gets what
magazine. The primary key for the Reader Table is the
Reader ID, the primary key for the Peridical Table is
Periodical ID, and the key for the Route table is the
combination of Reader ID and Periodical ID, thus creating
a subscription or route. I need for a user to be able to
select a reader from a combo box, then have the 2nd
listbox show only the periodicals that that reader is
subscribed to be shown (from the route tabel). The tricky
part is that i need for this form to be linked directly to
the route table because i need the user to be able to
click on a certain periodical in the 2nd listbox after the
itis updated, and have the ability to delete a certain
magazine, thus unsubscribing them. I cant seem to be able
to figure out how this can be done.

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top