Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query so checkbox makes table entry

Status
Not open for further replies.

NewTexican

Technical User
Dec 10, 2004
95
US
(1) Table that lists mailouts.

(2) Table that lists company and company address type (e.g. Company 1 mailing, company 1 physical)

(3) Table that puts mailout with company address (e.g. company 1 mailing gets mailouts 1 and 2, company 1 physical gets mailout 3)

If the company doesn't get a mailout I don't want there to be a record in (3).

What I want is a form that shows The company address and list of the mailouts (1) with a checkbox for each mailout. The user then checks the mailouts that go with that address type. Checking the box makes a new record that matches the mailout with the address in (3)

This is complex, but even a hint would be sooo appreciated.
 
The way I would do it is not with a check box, but a subform (datasheet) based on table three, with a combo box on it whose rowsource is table 1(Mailouts) and whose controlsource is MailoutID. The master/child links are CompanyID. So the user selects a mailout from the combo box, and it's automatically entered into table 3. then they pick an additional mailout in the second row of the datasheet. etc.

but maybe you don't like that cause you can't see all the 'mailouts' at one time?

Another option is to add every combination of MailoutID and CompanyID into a table as new ones of each are added to the database, and in that same table is a check box. Then just put this table into a subform, and as the user clicks the check box the data goes right into that table. Then on your reports/queries and such, you only display/print items that have checkmarks in them. This of course means that in order to keep the mailout/company combinations current (i.e. if you delete a mailout, delete a company, add one or the other) you have to have additional code to accomodate that.

do either of these appeal to you? The way you envision it is harder so I thought I'd throw these out there first.

g
 
I see what your saying. Since companies have multiple addresses the company address is already a subform. You would put a subform on that subform that has a drop down of all the mailouts? Idea 2 doesn't appeal to me because it would cause a lot of table entries that I don't need. Thanks for the detailed response, sorry it to me so long to get back.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top