Results 1 to 4 of 4
  1. #1
    rhewitt is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    74

    Using a form combobox to supply parameter to a query

    I'm trying to use a combobox on a form to supply a parameter value to a query without any success. I've managed this exact same thing within this database, but for whatever reason it's not working this time.



    I have a table 'Species' that contains data relating to many Species-At-Risk. I have a related (1-M) table called 'MajorDrainages' that contains large watersheds where these species are found. I'm trying to supply the DISTINCT values from this related table as the items in the Combobox.

    SQL for combobox Row Source:
    Code:
    SELECT DISTINCT MajorDrainages.MajorDrainage
    FROM MajorDrainages;
    The combobox continues to show up blank on my form. Any suggestions?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If this thread is truly Solved, would you care to share your solution with others that read this Forum?

  3. #3
    rhewitt is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    74
    I deleted the combobox, re-created it with the EXACT same SQL statement, and everything is working as expected. I have no explanation as to why it wouldn't work originally.

    They say doing the same thing twice, but expecting a different result makes you crazy.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Thank you! That approach works far more often in Access that you would think.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Supply and demand query
    By jamtrad in forum Queries
    Replies: 7
    Last Post: 01-26-2012, 02:29 PM
  2. Replies: 35
    Last Post: 09-19-2011, 10:13 AM
  3. Form to supply parameters to a report
    By Ray67 in forum Reports
    Replies: 11
    Last Post: 07-22-2011, 02:06 PM
  4. Query can't pull parameter from combobox
    By testsubject in forum Queries
    Replies: 3
    Last Post: 03-08-2011, 11:26 AM
  5. Parameter Query with Combobox?
    By Krs13 in forum Forms
    Replies: 3
    Last Post: 12-21-2010, 06:15 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums