Enter a parameter not showing combobox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Daltone
    New Member
    • Sep 2015
    • 2

    Enter a parameter not showing combobox

    Hi,

    Been following this thread

    http://bytes.com/topic/access/answers/196695-query-parameter-drop-down-box

    I have created a form called Combo, an in that form the item listed as the combobox is Combo 26.

    I have put the following in to the 'criteria' box of my query - [Forms]![Combo]![Combo26]

    But when I run it I don't get a combo box, just the standard 'Enter a parameter Value' display with the text Forms!Combo!Com bo26 above it. I am completely lost. Can anyone help?
    Attached Files
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    Is the form open when the query is ran?

    Comment

    • jforbes
      Recognized Expert Top Contributor
      • Aug 2014
      • 1107

      #3
      You'll have to Open you ComboBox Form prior to running the Query. When you ask Access to run a query, it will attempt to evaluate the query and then display the results. In this scenario, it will try to evaluate [Forms]![Combo]![Combo26]. So, first it will see if it can find the Form Combo in the Open Forms Collection and when it doesn't find the Form, it gives up and displays the Prompt in the UI.
      Last edited by jforbes; Sep 5 '15, 01:48 PM. Reason: haha, Hello Seth. =)

      Comment

      • Daltone
        New Member
        • Sep 2015
        • 2

        #4
        Hi,

        The form wasn't open (daft, I know). However, when I try it now the query just comes back blank. Is there a way to see what is actually being read from [Forms]![Combo]![Combo26] ?

        It should just be pulling back a number (like 0110)

        EDIT

        Bound Column on the combobox left at 1 when it should have been two. I am a nitwit.
        Last edited by Daltone; Sep 5 '15, 06:14 PM. Reason: Being a twit

        Comment

        • jforbes
          Recognized Expert Top Contributor
          • Aug 2014
          • 1107

          #5
          If you flip over to the VB Editor (alt+f11), then go to the immediate window (ctrl+g), you can type in a print command for the Control:
          Code:
          ?[Forms]![Combo]![Combo26]
          and it will evaluate it an return the value.

          Comment

          Working...