"Google" style search function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • QueenKirsty
    New Member
    • Jul 2009
    • 14

    #16
    Originally posted by FishVal
    Just a thought.

    What about iterating Recordsources of available (or relevant) forms instead of iterating available tables?
    That is a very good point. What I have actually done is created a facility to identify the tables that ought to be searched. I have populated this myself in the first instance and have set up a way of allowing the admin user to add more tables to this as needed. It also allows the user to search a subset of tables of their choosing.

    Comment

    • mshmyob
      Recognized Expert Contributor
      • Jan 2008
      • 903

      #17
      Originally posted by ADezii
      my next and revised super duper top secret logic, would be as follows:
      1. For each iteration of the TableDefs Collection, find out what the Primary Key is for that Table.
      2. At each String Search match, record the value of the Primary Key instead of the Record Number.
      3. The Dump at each Match would now consist of:
        1. Match Number
        2. Primary Key Value (instead of Record Number)
        3. Table Name
        4. Field Name
        5. Value in Match Field
      4. Of course, this logic would have some flaws also, but I am genuinely interested in any comment(s) you may have on this approach.
      5. Logic #3 - don't have it at this time! (LOL)!
      Super duper AND top secret on top of that, WOW!!!! I always thought you were holding out on us now I know for certain.

      Using PKs is much better, I always like using the PK as the lookup.

      and don't worry about your 3rd logic - Fish has taken care of that.

      cheers,

      Comment

      • ADezii
        Recognized Expert Expert
        • Apr 2006
        • 8834

        #18
        Originally posted by FishVal
        Just a thought.

        What about iterating Recordsources of available (or relevant) forms instead of iterating available tables?

        This way you:
        • doesn't get useless hits which couldn't be opened via existing forms
        • search in context of "records" displayed by form which in relational database are mostly expected not to be records of particular table but a records of table join or filtered table
        • .....
        • PROFIT


        Regards,
        Fish
        Excellent point, FishVal! Definitely thinking 'Outside-the-Box'!

        Comment

        Working...