GK in the UK
Registered User.
- Local time
- Today, 23:28
- Joined
- Dec 20, 2017
- Messages
- 281
I've been using this lookup routine in my application: https://access-programmers.co.uk/forums/showthread.php?t=188663
I've just been having a closer look at MajP FAYT which has some nice additional features. I commented out three lines of code in the class, so that when the user enters a partial search the listbox opens up pre-filtered to the search text. It doesn't seem to have broken it. This is how I tweaked the JBB routine to work. So, on the main form, product field, user enters 'Widgets' <enter> and the search form opens with blue widgets, red widgets, etc. The search box contains "Widgets" and the cursor is placed ready to receive further keystrokes, it's kind of seamless.
I may be over-thinking this (I usually do) but it seems to me:
John Big Booty passes the search string into the query on first use so the db (query) returns only Widget records. But, on every keypress, it requeries the db for the new search results.
MajP queries the db for the entire table once only (even if I pre-filter theTextBox as far as I can see) and filters the display results on each keypress. So one DB lookup only, albeit, potentially, a big one.
Just interested in commentary before I commit to changing over, for client-server usage. Network traffic kind of thing (Did I say I might be over-thinking it?)
I've just been having a closer look at MajP FAYT which has some nice additional features. I commented out three lines of code in the class, so that when the user enters a partial search the listbox opens up pre-filtered to the search text. It doesn't seem to have broken it. This is how I tweaked the JBB routine to work. So, on the main form, product field, user enters 'Widgets' <enter> and the search form opens with blue widgets, red widgets, etc. The search box contains "Widgets" and the cursor is placed ready to receive further keystrokes, it's kind of seamless.
I may be over-thinking this (I usually do) but it seems to me:
John Big Booty passes the search string into the query on first use so the db (query) returns only Widget records. But, on every keypress, it requeries the db for the new search results.
MajP queries the db for the entire table once only (even if I pre-filter theTextBox as far as I can see) and filters the display results on each keypress. So one DB lookup only, albeit, potentially, a big one.
Just interested in commentary before I commit to changing over, for client-server usage. Network traffic kind of thing (Did I say I might be over-thinking it?)