Copy Subform1 items to Subform2

W

WarrenR

Can anyone give me an idea how to do the following program wise. I haven't a clue as I have new to VBA in Access. Thanks!

I am wanting to track the correspondence that is mailed out to certain people listed in my FAMILY table. All the company correspondences are stored in the MAILING table. The FAMILYMAILING table tracks all the corespondences for each FAMILY.

On the form I have a dropdown combo-box, and two unbound subforms.
-The top of the form is the combo-box containing all the available correspondences the company sent out. Only one is selected and supplies the MailingID.

-The right subform will contain all the FAMILYS. The subform is populated by a query as its data source. (Included in the form are fields FamilyID and Name([Lastname]+", "+{Firstname]) - which is used only for display. This supplies the FamilyID for the left subform for records selected.

-The left subform will contain all the FAMILYS that were or will be included in a particular mailing. (Included in the form are fields MailingID, FamilyID and Name-which is used only for display) I want to select Familys in the right subform and "copy" them to the Left subform. During the copy process the MailingID from the combobox will be included in the new record in this subform. This subform will update the FAMILYMAILING table.

By the way, I have two command buttons between the two subforms - one with an arrow pointing left and the other with an arrow pointing right.
Let me know if you need more explaination from me so you can answer my questions.

In case you are interested, here is a snapshot of three table relationships: There is a 1 to many relationship from FAMILY to FAMILYMAILING and a 1 to many relationship between MAILING and FAMILYMAILING.
1) FAMILY
FamilyID (pk)
Lastname
Firstname

2) MAILING
MailingID (pk)
DateMailed

3) FAMILYMAILING
FamilyID (pk)
MailingID (pk)

Thanks,
-WarrenR
 

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