Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old May 16th, 2006, 08:45 PM
sweyer via AccessMonster.com
Guest
 
Posts: n/a
Default Double one to many....PLEASE READ

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
  #2  
Old May 17th, 2006, 04:05 AM
pietlinden@hotmail.com
Guest
 
Posts: n/a
Default 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.

  #3  
Old May 17th, 2006, 08:15 PM
sweyer via AccessMonster.com
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,338 network members.