AutoFill.

By Gary O'Connor

Made by modifying some code which had previously been modified by 'Jackie', as well as my own personal routines and ideas.

This code is a an easier way to achieve the same result as was posted in the file called 'An elegant use of Auto Complete' that I recently posted.

It occured to me that a lot of people would not want or need the extra code that I intentionally added to the other version. This achieves the same result with about half the code and would probably suit most people. 

The programme that the original code I posted came from uses a lot of databases and I wrote the code so that the databases required for the lookups would open when the programme opened, fill the lists and lookup tables and then get out of the way until the programme was closing, where they would re-open if necessary to claim any added data. This would not normally be a problem and so I have shortened the whole thing for you.

It is a very elegant use of the AutoComplete routines found elsewhere on this site. (FreeVBCode.com). It has made my programme extremely intuitive and that is the ultimate aim of every good programme.

I needed Auto Completion using data that my programme supplied as opposed to the standard understanding of the AutoComplete phrase, which is to AutoComplete using system default values like Internet Explorer does.

I found some really good code, I am really sorry but I do not know who wrote the original only that it had already been modified by someone named Jackie, and I modified it again to suit my purposes.

The example programme included is very richly commented and anyone with a little experience with vb should be able to follow what I am doing.

Here is an outline of what I wanted to achieve.

1. AutoCompletion must use data that I supplied.
2. The programme must be able to add data to the lookup tables and database for future use.
3. Must be able to confine the user to certain data on some tables but allow new entries on others.
4. Must be good to look at and intuitive to use.

I have achieved all of that and this code will find it's way into all my future programmes where lookups are required.

Gary O'Connor
Email: oconnorgary@hotmail.com