Results 1 to 4 of 4
  1. #1
    LonghronJ is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Posts
    150

    Listbox in form is current upon form open

    I have a form that has a listbox which is based on a query that has a TempVar variable in the criteria. The user is directed to this form from another form which assigns the variable prior to this form. I noticed that the listbox is not filtered by this variable upon opening. Only if I go to the Design view and launch the form , then the listbox is filtered. I have even requery the listbox on On Open event and On Load event. I went as far as put a short pause upon opening, and still no luck. What am I doing wrong?

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    would need to see your code to have any real idea but sounds like perhaps the form is already open so 'launching' the form would not trigger a refresh or the open/load events

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    if you want the value of the listbox , just ask using the full path:

    msgbox forms!form2!lstBox

  4. #4
    LonghronJ is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Posts
    150
    I apologize for wasting everyone's time. After stepping through the codes and the query, I noticed that I did not assign the correct variable to the correct field.

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

Similar Threads

  1. Replies: 7
    Last Post: 10-13-2016, 12:32 PM
  2. Replies: 3
    Last Post: 04-18-2014, 12:20 PM
  3. Replies: 10
    Last Post: 10-14-2013, 10:18 AM
  4. Replies: 3
    Last Post: 08-18-2012, 03:21 PM
  5. Open (sub)form linking 2 criteria on current form
    By websterh in forum Programming
    Replies: 2
    Last Post: 02-07-2011, 11:56 PM

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