Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815

    That's because this is a 'conditional' (AKA 'cascading' or 'dependent') combobox/listbox using an alias value. When filtered, alias values are not available for display. A known issue and topic of many discussions. Cannot prevent, just work around. One way is to include lookup table in form RecordSource, bind textbox to lookup table field (set as Locked Yes and TabStop No) and set textbox next to or on top of combobox.
    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.

  2. #17
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    another is to use vba to modify the rowsource on entering and leaving the combo

    on entering, set the rowsource with criteria based on your 'conditional' control

    on leaving, set the rowsource without the criteria

    you also need code to reset combo values if the conditional control value changes

    an example here https://www.access-programmers.co.uk/forums/showthread.php?t=275155&highlight=cascading

  3. #18
    jack1988 is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2021
    Posts
    5
    thank you so much for your help. I got the solution described in the latter entry to work.

    I was wondering if you could also help with a related issue of a searchable combobox pulling records from a table. the function works but it also displays an error message after completion:

    Run-time error '2185': you can't reference a property or method for a control unless the control has the focus.

    When I debug vba it highlights the following entry:

    If Len (me.combobox.text) > 0 then

    based on internet search I tried to change that part to (me.combobox.value) but it did not solve the problem. any help would be greatly appreciated

    thank you so much

  4. #19
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Set focus to the control first? If you can't then you can't use the Text property and will have to change your approach.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #20
    jack1988 is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2021
    Posts
    5
    awesome, setting focus first worked !!
    thanks very much

  6. #21
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I really didn't tell you anything that the message didn't already tell you but I'm glad it helped somehow.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Search as you type
    By Farnarkle in forum Programming
    Replies: 3
    Last Post: 11-17-2014, 06:03 AM
  2. Replies: 11
    Last Post: 11-09-2014, 05:18 PM
  3. Find as you type textbox to combobox
    By michael.legge@rbc.com in forum Access
    Replies: 3
    Last Post: 07-09-2013, 09:59 AM
  4. Search as you type
    By CaptainKen in forum Programming
    Replies: 19
    Last Post: 04-25-2012, 12:55 PM
  5. Cannot type in form with combobox
    By fuller in forum Access
    Replies: 8
    Last Post: 12-09-2011, 10:32 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