mailing label groups

osullipa

Registered User.
Local time
Today, 16:57
Joined
Dec 7, 2004
Messages
31
I have a database of customers for which I want to print address labels depending on what group I have entered them in. There are about 30 different groups that they could be a member of. I have entered them in to groups by using "yes/no" fields on the customer table to indicate who is a member of which set. My problem is that I know how to indentify which group is required using sql

eg select surname,address from table where GP

where GP is one of the possible groups. I cannot however see a way of selecting the group variable from a form and entering into a query, so that I can print the required label set.

Can anyone please advise me on this or point point me in the direction of an example. I tried using a combo box on form but could not get it to pass the parameter correctly. Many thanks in advance.

Regards

Peter
 
osullipa said:
I have a database of customers for which I want to print address labels depending on what group I have entered them in. There are about 30 different groups that they could be a member of. I have entered them in to groups by using "yes/no" fields on the customer table to indicate who is a member of which set. My problem is that I know how to indentify which group is required using sql

eg select surname,address from table where GP

where GP is one of the possible groups. I cannot however see a way of selecting the group variable from a form and entering into a query, so that I can print the required label set.

Can anyone please advise me on this or point point me in the direction of an example. I tried using a combo box on form but could not get it to pass the parameter correctly. Many thanks in advance.

Regards

Peter

Your database is not normalized properly. Having 30 Yes/no fields to indicate the grouping is called a Repeating group and violates normalization rules. Instead you should have a table like:

tblCustGroup
CustGroupID (PK autonumber)
GroupID (FK)
CustomerID (FK)

and tluGroups
GroupID (PK Autonumber)
GroupName

To implement you have a subform on your Customers form With a combobox to select the groups they belong to.

From there its very easy to create a query that joins the Customer table to the CustGroup table on CustomerID and filter it for any one or more groups you want to include in a mailing.
 

Users who are viewing this thread

Back
Top Bottom