Results 1 to 2 of 2
  1. #1
    mib1019 is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    May 2020
    Posts
    54

    Move to specific row in a combo box

    I have a combo box on a form

    SELECT [qryTTT Media].Company_ID, [qryTTT Media].CompanyName, [qryTTT Media].Market
    FROM [qryTTT Media]


    WHERE ((([qryTTT Media].[Bill_ID].[Value])=8))
    ORDER BY [qryTTT Media].Market, [qryTTT Media].CompanyName;

    The box displays CompanyName and [qryTTTMedia].Market.

    I'd like the box to zoom to the first item that is not null in the Market column. I want to keep the Market column as the first sort, but want to get to the first place in the list that actually has a Market in it.

    Any ideas?
    MIB1019

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Why would column have null (actually, empty string)? Why would there not be a Market?

    Unusual requirement. I can think of two options.

    1. loop through the combobox items list until encounter first one with Market

    2. open a recordset filtered to the one record that matches criteria and set value of combobox with that record ID

    Exactly when do you want this action to take place - when combobox gets focus?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Referencing specific column in combo box
    By Glenn_Suggs in forum Forms
    Replies: 3
    Last Post: 10-30-2018, 05:59 AM
  2. Replies: 3
    Last Post: 12-11-2014, 11:26 AM
  3. Replies: 3
    Last Post: 03-11-2014, 12:12 AM
  4. Replies: 2
    Last Post: 02-08-2014, 07:10 PM
  5. Replies: 6
    Last Post: 03-29-2013, 02:51 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