Results 1 to 8 of 8
  1. #1
    4hotn is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    May 2014
    Posts
    3

    Need help to assign a combobox row source after 1 or 2 characters are typed in

    I used the combo box wizard to find a record on a form. But now we've past the combo box record limit. I want to assign the row source after 1-2 characters are typed in.


    Need help on how to do this.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I think the listbox control can retrieve more records than the combo but I do not know for sure. I have never had a problem with it because I do not push their limits. Combos are slow performers.

    I do not know what you mean by 1-2 characters typed in.

    Maybe you should employ another combo. Have the first combo dictate the RowSource of the second, dependent, combo.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    That would require code in the combobox OnChange event to set the combobox RowSource property and to Requery the combobox. Review http://allenbrowne.com/ser-32.html
    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.

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Allen's hack for this problem is the one that I always suggest.

    Linq ;0)>

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by Missinglinq View Post
    Allen's hack for this problem is the one that I always suggest.

    Linq ;0)>
    After reading the solution, I think I now understand the question.

  6. #6
    4hotn is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    May 2014
    Posts
    3
    I've tried Allen Browne's fix for this. I'm a self taught user and that fix is over my head. The first 2 steps confuse me because I don't know where the "general declarations" of the forms module is. And I can't find the "current" event. Isn't there an easier fix out there? I want to open a record on my form. I used the wizard to create a combo to do that and it has worked great for 10 years. But now we have exceeded the record limit for the combobox to work efficiently.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I do not think so.

    If it doesn't already exist, one way to initiate the form's code module is by opening the form in Design view, select the combobox and look at the Events tab on the Properties Sheet. Go to the OnChange event. Select [Event Procedure] then click the ellipsis (...) to open the VBA editor and you will be in the VBA procedure. Paste the event code as instructed by Allen.

    The first two lines of every module should be:

    Option Compare Database
    Option Explicit

    Those two lines are in the General Declarations section. Paste the first procedure from Allen's example just after those lines.
    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.

  8. #8
    4hotn is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    May 2014
    Posts
    3
    Does anyone know of a sample database online that has Allen Browne's fix for this in use? It would help me enormously to see how it is implemented and then I should be able to get this to work.

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

Similar Threads

  1. populate a field from multiple source fields using a combobox
    By tranquillity in forum Database Design
    Replies: 8
    Last Post: 09-13-2013, 06:46 PM
  2. Replies: 8
    Last Post: 12-01-2012, 04:17 PM
  3. Dynamically set the row source of a combobox???
    By Richie27 in forum Programming
    Replies: 2
    Last Post: 06-13-2012, 09:35 AM
  4. overriding combobox row source
    By mitchmcc in forum Access
    Replies: 7
    Last Post: 01-07-2012, 05:13 AM
  5. ComboBox Row Source Value
    By mpbertha in forum Forms
    Replies: 1
    Last Post: 08-21-2009, 06:34 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