Pick List Form

andy_dyer

Registered User.
Local time
Today, 21:09
Joined
Jul 2, 2003
Messages
806
Hi,

I have a list of names and addresses I would like to be to pick and choose what names I would liek to export to Word for a mail merge for address labels...

I have a few ideas floating round my head but cannot work out how I can have the names displayed and how I can choose the ones for printing...

Hopefully someone has had this problem before!!

Any suggestions??
 
Why bother with exporting to Word when you can just as easily have a report which will do the labels?
Is this something you'll need to do on a regular basis? If so, I'd say the easiest thing to do would be to add another field to your table which is a check box field, have your form with the names and addresses in datasheet view, then you should be able to tick the ones you want. Then use a query to get the addresses you want (true in criteria), then create a report (easiest with the label wizard).
I'm sure that Mile or Rich will come up with a better suggestion, but this is what I'd probably do.
 
Thanks Tay!

That was generally the idea that i was working on!!

I have now got my list working and a field "Selected" on the end that is a check-box.

I am attempting to write a query that only picks up those that have this set as true with no success...

I am also attempting to create a command button that clears all the selection, with no success...

My main form is frmAddresslabels and the subform is frmLabels.

The subform is controlled by qryLabels.

My query qryPrintLabels uses this code at present:

SELECT [qryLetterAddresses].[StaffName], [tblPracticeAddresses].[Practice Name], [tblPracticeAddresses].[Address 1], [tblPracticeAddresses].[Address 2], [tblPracticeAddresses].[Address 3], [tblPracticeAddresses].[Post Code]
FROM qryLabels, (tblPracticeAddresses INNER JOIN qryLetterAddresses ON [tblPracticeAddresses].[PracticeID]=[qryLetterAddresses].[PracticeID]) INNER JOIN tblStaff ON ([tblPracticeAddresses].[PracticeID]=[tblStaff].[PracticeID]) AND ([qryLetterAddresses].[StaffID]=[tblStaff].[StaffID])
WHERE ((([Forms]![frmAddressLabels]![frmLabels]!Selected)=True))
GROUP BY [qryLetterAddresses].[StaffName], [tblPracticeAddresses].[Practice Name], [tblPracticeAddresses].[Address 1], [tblPracticeAddresses].[Address 2], [tblPracticeAddresses].[Address 3], [tblPracticeAddresses].[Post Code];

But doesn't work...

What am i doing wrong??
 
What's wrong with a multi-select listbox and then basing a query on everything selected within it?
 
Nope, only long enough to export to Word, as soon as I close my form I want the selection cleared anyway...

Have you other suggestions??
 
Maybe I'm missing something here, but why is your subform based on a query? Can you post the db here?
 
andy_dyer said:
Have you other suggestions??

I see a post by myself a little further up this thread...:rolleyes:
 
Thanks Mile-O-Phile, but what is a:

a multi-select listbox and then basing a query on everything selected within it?

:confused: :confused:

The reason why I based the form on a query is that the information I need is spread across several tables.

I will attempt to post a sample database...
 
I have a list of names and addresses I would like to be to pick and choose what names I would liek to export to Word for a mail merge for address labels...

That's the part I read.

A mult-select listbox is - wait for it! - a listbox with its multi-select property turned on to either Simple (the preferable) or Extended.

I read your statement as having a list of names and addresses so thought the listbox could have the details in it, you select the ones you need, and using its ItemsSelected property you could build a query criteria to return the ones you want.
 
Ok, together with reading Access Help and your reply I now know a little more about List Boxes!!

I've never used them before!

I have created a list box and set it's multi-select to Simple.

I cannot fathom out how to pick up the selected ones in a query tho....

:confused:
 
After much blood, sweat and tears I've worked out how to configure dcx693's code for my database!!

Thanks go to both Mile-O-Phile and Tay for persistance with me!!

Also thanks to dcx693 even though he has no idea that he helped!!
 

Users who are viewing this thread

Back
Top Bottom