Results 1 to 3 of 3
  1. #1
    Fiache is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    2

    Question Apply Filter with Combo Box

    Apologies if this has already been posted and answered, frustrated and tired and didn't look for a similar post very long. In any event:



    Have a form "frmViewOrderData" that displays Orders, one order at a time. On this form I have a combo box "txtSelectOrder" with an Apply Filter Macro bound for AfterUpdate Event. The code for the Apply Filter is [OrderNumber] like "*" & [form]![txtSelectOrder] & "*". For those who are lost at this point (I'd have been six months ago) when the user makes a selection in the txtSelectOrder Combo Box the Form displays the chosen Order Details.
    This worked fine until a few hours ago, I could open the form and choose the Order I wanted to view. Then I closed the database and focused on other issues for an hour or two. When I reopened the database and form, and then attempted to use the combo box I got a popup with
    Enter Parameter V... ? [form]![txtSelectOrder]. Obviously if I again enter the data into the popup everything works as expected, if I choose not to enter any data or just close the popup the form redisplays the first record.

    I have another form "frmEditOrderData" which is exactly the same form, just with all the fields enabled. It uses the same (I believe) code, macros, etc. and it works. Just the "frmViewOrderData" has the problem (at least so far).

    So does anyone know what is causing this? Or what I'm missing, pretty much at a loss here.

    Thanks.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Your textbox reference is wrong,
    either use Me.txtBox (code inside the form)
    or
    Queries, use the FULL path : forms!myForm!txtBox

  3. #3
    Fiache is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    2
    Thanks ranman256. I'll did try the full path, no joy. But I will change my references for text boxes, Thank you for the heads up.

    The problem is that I have all the visible fields on the View Form disabled for editing. And that is not allowed, Access won't allow one to filter a field that is disabled for editing. So I have to create two fields both linked to the same source, the visible one, I disable for editing. The hidden one is the field I call out for in the apply filter macro.

    Again ranman256 thanks for the help, have a good day.

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

Similar Threads

  1. Apply Filter to a Table using Combo Box
    By krizzyd in forum Forms
    Replies: 1
    Last Post: 11-27-2016, 04:05 PM
  2. Apply FIlter from Combo Box
    By Trilback in forum Forms
    Replies: 1
    Last Post: 11-03-2016, 11:52 AM
  3. Filter By Form and Apply Filter Buttons
    By JustLearning in forum Forms
    Replies: 13
    Last Post: 02-18-2015, 01:01 PM
  4. Replies: 2
    Last Post: 02-25-2013, 10:47 AM
  5. Apply Filter similar to Field Filter
    By DatabaseIntern in forum Forms
    Replies: 1
    Last Post: 06-11-2012, 05:42 PM

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