Results 1 to 3 of 3
  1. #1
    mond007's Avatar
    mond007 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    May 2010
    Posts
    52

    MS Access query not working with Combobox on a Form as parameter

    Hi

    I have a query that accepts a parameter from form that is not working. See following :

    Click image for larger version. 

Name:	parameter_img_01.jpg 
Views:	11 
Size:	54.1 KB 
ID:	25823

    Click image for larger version. 

Name:	parameter_img_02.jpg 
Views:	11 
Size:	126.5 KB 
ID:	25824

    So the first obvious thing is that I have tried to get the Selected value from the Combobox into a Textbox which gives me the ID rather than the actual Dept Code (PT-24).

    Hence this is why the query is not working. when I hard code the value ="PT-24" into the Query criteria this works fine.
    I am clearly missing something here.



    I am using the following for syntax which I have looked up in many tutorials and is supposed to work.

    [Forms]![Frm Run Starter Leaver Query]![cboSelectedPtSubDept]

    Any assistance would be appreciated. Thanks in advance.
    Attached Thumbnails Attached Thumbnails parameter_img_01.jpg   parameter_img_02.jpg  

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    The combo box has bound column.
    you can show >1 column, but the value is what is in Bound column.

  3. #3
    mond007's Avatar
    mond007 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    May 2010
    Posts
    52
    Brilliant thank you I knew it was something something simple.

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

Similar Threads

  1. ComboBox to Run Query and enter Parameter
    By tristangemus in forum Forms
    Replies: 13
    Last Post: 06-25-2013, 09:54 AM
  2. Replies: 3
    Last Post: 09-12-2012, 09:20 AM
  3. Query can't pull parameter from combobox
    By testsubject in forum Queries
    Replies: 3
    Last Post: 03-08-2011, 11:26 AM
  4. parameter query not working
    By denny in forum Access
    Replies: 3
    Last Post: 02-20-2011, 01:07 PM
  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