Use the data form wizard. Search my handle and those keywords to learn how to invoke it, use it, and what to do with it.
Good Luck
vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
Only problem with that johnly is using the change event of the textbox. As the lookup code (number/alpha) gets longer your code will be executed each time there is a change! Which means for a four digit code, your code will pound the datbase four times with your look up query! Better to put the actual search under a command button (or perhaps the lost focus event of the text box if you want a high amount of automation).
sackymatt,
Have you even tried the Data Form Wizard and see what code it generates for you?
Good Luck
vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
Start a new standard exe project>vb's ide menu>Add-Ins>Add-In Manager.
Hightlight VB 6 Data Form Wizard
Lower right corner of form where frame with caption says Load Behavior put a check in the box next to Loaded/Unloaded>click Ok
Add-Ins>Data Form Wizard
Follow wizard enough times to get every combination of form type along with code/class/control.
Save project for future reference.
Good Luck
vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
Okay, the reason your access database/vb6 creates that error is because VB6 is quite dated and to resolve that problem you would need to save your database to a previous format. Once that is done you should be able to run the wizard but as for converting back to the database format you want to use, I don't think the ADODC will be able to handle then new format (maybe it will if you change its connection string through code but I have never tried, I always use code).
Good Luck
vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296