Microsoft Access drop-down list problem

  Luthien 07:50 27 Oct 2006
Locked

Hi there all you Access gurus, hope you can solve my problem. What I wish to do is create a drop-down list of names on a form and, by selecting a name, run a macro or an event procedure to execute a print command. I've tried various things, but none come anywhere close to working. Any help would be greatly appreciated.

  Rand Al Thor 09:15 27 Oct 2006

I will assume you have the report names already in your combo box. If not, let me know. Anyway, in the After Update event of your combo box, put this line of code. Beware, there is no error checking.

DoCmd.OpenReport Me.YourComboBoxName

  Luthien 11:32 29 Oct 2006

Hi Rand Al Thor, sorry I haven't replied sooner, too much going on at work. I have already created the print jobs, which are simply a page of labels with the same name and address on them, one job for each of thirty-odd people, and thought it would be much easier to create a drop-down so that all I required to do was click on the relevant name and the page of labels would print. Hope this makes sense. Any further help appreciated.

  Rand Al Thor 09:04 30 Oct 2006

I will make another assumption, that is the print job is based on a query. If so, you only need to refer to your combobox on the form in the criteria of your query. e.g. Forms!YourFormName!YourCombob0xName

  Luthien 12:52 30 Oct 2006

Rand Al Thor, the print jobs are set up as Labels and named according to each individual person, there is no query behind them. Each label has the name and address of the person coded into it. Going into Access all I have to do is highlight a report/label, click Preview and the full sheet is displayed, then click Print to print it out. I was looking to do this from a drop-down list inside the application. If you know of a better way using a query then I would be only too willing to try. Thanks for your time.

  Rand Al Thor 14:28 31 Oct 2006

Luthien. Your problem is a little more complicated than I first thought. However, I do have a solution. If you would like to email me your email address, I can attach it for you. The answer is a little too long and complicated to post on the forum.

  Luthien 08:46 09 Nov 2006

Hi Rand Al Thor - I forwarded my e-mail address, did you receive it okay?

  Rand Al Thor 12:18 09 Nov 2006

No, best send it again.

  Luthien 16:24 16 Nov 2006

Hi Rand Al Thor - I re-sent my e-mail address, but I guess you didn't receive it again. I'm clicking on the envelope next to your name on the post, entering my address in the Message box, and clicking Send Message. Is there anything missing from the above? It's the first time I've tried forwarding my e-mail address to someone.

  Luthien 17:03 21 Nov 2006

bump

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Fujitsu Lifebook P727 laptop review

Microsoft Paint set to die after 32 years

Mac power user tips and hidden tricks

Comment désactiver la saisie intuitive et paramétrer votre clavier ?