Results 1 to 4 of 4
  1. #1
    Stumper
    Guest

    macros from a combo box

    Is it possible to have each selection in a combo box refer to a macro?

    I want to build a drop down list that will allow users to print this form, print a different form, etc. Buttons take up too much space on the form - hence the desire for the combo box.

  2. #2
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Tennessee
    Posts
    194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macros from a combo box

    you could with code
    if combo1 = "print this" then
    docmd.runmacro "macro1"
    elseif combo1 = "that" then
    docmd.runmacro "macro2"
    end if

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: macros from a combo box

    You could use the string value selected in the combobox to reference the macro like this:
    <pre> DoCmd.RunMacro me!cboMacros</pre>

    Where cboMacros is the name I used for your combobox.
    Charlotte

  4. #4
    stumper
    Guest

    Re: macros from a combo box

    Thanks for the suggestions. I'll be trying these shortly, now that this other thing has been solved....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •