Results 1 to 2 of 2
  1. #1
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    672

    Capture Value From listbox

    This syntax works as it should if the listbox has focus. However, if the listbox has been tabbed out of, or another control clicked this syntax always shows the listbox is null. How can I capture the selected value from the listbox even if the user has clicekd out of it?


    Code:
    If IsNull(Me!List10)Then
        MsgBox "Please Select A Value!", vbOKOnly
        Me.List10.SetFocus
        ExitSub
    Else
        selectedoption =Me!List10
    EndIf
    

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    No, if an item has been selected in the list box,
    then lost focus, it still retains its value.

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

Similar Threads

  1. Capture MAX() Value From Table In VBA
    By jo15765 in forum Programming
    Replies: 2
    Last Post: 05-23-2017, 09:25 AM
  2. Data Capture app
    By Homegrownandy in forum Access
    Replies: 8
    Last Post: 09-24-2015, 09:02 AM
  3. Replies: 2
    Last Post: 03-23-2014, 06:50 AM
  4. Replies: 1
    Last Post: 09-10-2012, 11:21 PM
  5. Replies: 5
    Last Post: 01-15-2011, 01:35 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