• Printing Choices in a Combo Box (2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Printing Choices in a Combo Box (2000)

    Author
    Topic
    #370335

    Someone has come to me with the following question that I’m not sure how to answer. Let’s say you have a fieldname that is a lookup field/combo box. Is there a way to print a report that shows the choices in the combo box? (rather than just the one that is chosen for that one record).

    -Kelley

    Viewing 0 reply threads
    Author
    Replies
    • #585637

      Hi,
      I would have said that the simplest way would be to create a query based on the rowsource of the combobox. You can then create a report based on that or simply use the query output depending on your needs.
      Hope that helps.

      • #585639

        Thanks for the suggestion. How do I create a query based on the rowsource?

        • #585640

          Open the properties for the field/combo and copy whatever is in the rowsource box. Then create a new blank query (i.e. don’t add any tables) and switch to SQL view. Paste in your copied rowsource and away you go.
          Any problems please post back.

          • #585643

            Rory — Would it matter if the choices in the rowsource box were typed in rather than pulling from another table? When I switch to SQL view the word SELECT; there by default. I am not sure what the syntax should be in there when I paste the info from the rowsource in there (which is “MR.”;”MRS.”;”MS.”) as an example. It seemed that no matter where I paste it, I get some sort of error about syntax or arguments required.

            -Kelley

            • #585650

              Oh sorry – I assumed it was a lookup against one or more tables. If it’s a value list then whatever is typed in there is your set of possibilities. You can simply look at the list (not likely to be long or else a table would be a better way of doing it). Is it just one combobox the user is interested in or some sort of database analysis of all lookup/comboboxes? If it’s the latter you will need code to do it.

            • #585655

              Kelley,

              have a look at this post. Maybe it can help you.
              If you want the the data in a list change the line
              ComboToLine = ComboToLine & Me.Combo0.ItemData(x) & “, ”
              to
              ComboToLine = ComboToLine & Me.Combo0.ItemData(x) & vbCrLf

    Viewing 0 reply threads
    Reply To: Printing Choices in a Combo Box (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: