Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    I have looked but cannot find anything definitive about a default type for a collection. A lot of documentation refers to adding objects to a collection, but also says that the collection itself can contain different types. That and the fact that in your procedures, one added data from a string variable (which worked) while the other added the same data from a variant. If coercing the variant to a string (CStr) or declaring the faulty variable as a string fixed the problem, it seems logical that the collection default type is an object.

    For what you're doing, have you considered using a dictionary object? Apparently keys are more useful.

  2. #17
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    For what i'm doing the keys only purpose is to weed out the duplicates. I'm still waiting for that AHA! moment with dictionaries. I've read a bit about them but haven't
    seen a demo or some code that makes me say "Now I get it."

  3. #18
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Did you consider suggestion to use DISTINCT in the query?
    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. #19
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    hi June,
    I'm making three comparisons for the matches, Exact, levenschtein distance, and soundex to catch variations and spelling mistakes in the inputted name.
    Basically my Sql selects the whole table or a subset of the table based upon the first letter of the inputted first or last name.
    It works well enough that I haven't had a duplicate since I began using it.
    Heres an example although my actual implimentation is much more complex.

    searchdb.zip

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

Similar Threads

  1. Replies: 6
    Last Post: 04-20-2018, 04:45 AM
  2. Error "item not found in this collection"
    By andy49 in forum Queries
    Replies: 7
    Last Post: 11-12-2016, 12:46 PM
  3. Run-Time Error '3265': Item Not Found In This Collection
    By Voodeux2014 in forum Programming
    Replies: 3
    Last Post: 01-29-2016, 09:04 AM
  4. Forms collection vs. AllForms collection
    By Access_Novice in forum Programming
    Replies: 1
    Last Post: 01-03-2016, 12:30 AM
  5. Replies: 3
    Last Post: 11-16-2012, 10:15 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