Connecting Tech Pros Worldwide Help | Site Map

Double one to many....PLEASE READ

sweyer via AccessMonster.com
Guest
 
Posts: n/a
#1: May 16 '06
Okay, so this is my situation. I have a database that stores clients and
their corresponding groups. (We're an insurance brokerage, so we have each
company's information and each of their clients' information). One of the
features of this database is to track mailouts and newsletters. I have a form
to add individual clients to the mailouts, but I would like to also be able
to choose a company and have it populate ALL of the employee's mailouts to
show that each employee recieved the mailout.

Here's my table layout:
GROUPS - GroupID (primarykey), GroupName, etc...
GROUPMAILOUTS - GroupID, MailoutID
EMPLOYEES - EmployeeID (primarykey), GroupID, FirstName, LastName, etc...
EMPLOYEEMAILOUTS - EmployeeID, MailoutID
MAILOUTS - MailoutID (primarykey), MailoutDate, MailoutName, File (OLEobject)

Relationships:
Groups ---> Employees (one group, many employees)
Mailouts ---> EmployeeMailouts, GroupMailouts (one mailout, many employees
and groups can recieve it)
Employees ---> EmployeeMailouts (each employee can have many mailouts)
Groups ---> GroupMailouts (each group can have many mailouts)

When a group is chosen, the GroupMailouts table will be populated with the
groupID and the mailoutID. When you choose this group, I want it to not only
populate the GroupMailouts table with the groupID and the mailoutID, but also
populate the EmployeeMailouts table with each person in that group's
employeeID and the mailoutID.

I have a form that you can input the mailout's name, date, and upload the
file. On the same form, I have a subform where you can choose individual
employees to receive that mailout. I would like to be able to choose a group
and have it automatically put all the employees from that group in the
subform.

I have an employee form that shows all the information for each employee,
including dependents, policies, and mailouts recieved. I have a subform that
shows all the mailouts for that person. If we choose just a group without the
automatic population, it won't show in this subform.

How do I do this?? Someone help, please!

--
Message posted via http://www.accessmonster.com
pietlinden@hotmail.com
Guest
 
Posts: n/a
#2: May 17 '06

re: Double one to many....PLEASE READ


how to show all members of mailing list... use an append query....

Basically, show all the members of whatever group you're selecting from
your combobox. then create an append query to append all of those to
the subform table. Call it in the OnChange (?) event of the combobox
You might want to prompty the user for the standard "Are you sure?" so
that you don't accidentally add lots of records you didn't intend to.

sweyer via AccessMonster.com
Guest
 
Posts: n/a
#3: May 17 '06

re: Double one to many....PLEASE READ


The append query worked perfectly. I added a msg box in the code and if yes=
run the append query. Thanks!

pietlinden@hotmail.com wrote:[color=blue]
>how to show all members of mailing list... use an append query....
>
>Basically, show all the members of whatever group you're selecting from
>your combobox. then create an append query to append all of those to
>the subform table. Call it in the OnChange (?) event of the combobox
>You might want to prompty the user for the standard "Are you sure?" so
>that you don't accidentally add lots of records you didn't intend to.[/color]

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200605/1
Closed Thread