Results 1 to 4 of 4
  1. #1
    Chad78 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2018
    Posts
    2

    Query falsely recognizing procedure as data in criteria field

    Hello,

    I am a very new user with limited knowledge mostly based on using Access 15 years ago (nothing since) and YouTube videos. I need help. I am trying to create a form with a combo box listing different contractors I would like to query and a command button that will create a report from that query. Doesn't seem too complicated. But Access seems to keep falsely recognizing the procedure as data in the criteria field of the query, as though it is one of the contractors I am trying to query. So of course when I go to my combo box on my form it lists no contractors. Here is the procedure: [Forms]![FrmContractor2]![ComboContractor]. From everything I have read or watched on YouTube it seems that I am doing it right. However, I may have some setting off that is not allowing procedures to run or something. Let me know if you have any suggestions. Thanks.



    Chad78
    Attached Thumbnails Attached Thumbnails Access Screenshot.jpg  

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    [Forms]![FrmContractor2]![ComboContractor] IS correct.

    IF the combo has a value.
    IF the combo is bound to the correct column that has a value for the field in your param.
    ex: if combo value = 1 (the key) but the combo shows SMITH, and the contractor is a string for SMITH...the query will fail. If the contractor field is numeric (for key ID) then it will work.

  3. #3
    Chad78 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2018
    Posts
    2
    Gotcha. That makes sense. Let me give it a shot, which will take me a little while rebuilding a few things with how slow I am at this right now. Will let you know.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,799
    Just in case, the combo on your form is not bound to a query or table field, I hope. If you're using them for searching, they should have a row source but not a control source.

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

Similar Threads

  1. Replies: 7
    Last Post: 11-25-2018, 11:31 PM
  2. Split database not recognizing data validation rules
    By JoeCson in forum Database Design
    Replies: 5
    Last Post: 03-02-2017, 02:35 PM
  3. Replies: 12
    Last Post: 10-01-2015, 03:01 PM
  4. Replies: 11
    Last Post: 10-02-2013, 01:50 PM
  5. data field in query twice based on criteria
    By sandyg in forum Queries
    Replies: 1
    Last Post: 09-29-2011, 07:47 AM

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