Hi Experts! <Visual Basic 2008 Newbie here> !
I want to create a very simple (1 page VB2008 form), which connects to an external table, "looks up" values based on a Zip Code ... and populates three(3) textboxes on my form. Note: I purchased a TABLE (ZipInfo) from a commercial carrier, which is ALREADY POPULATED with every valid zipcode, city, state and county in the country.
So.. to begin:
1) I want to create a VB 2008 Form, which will have only four (4) text boxes, labeled as follows: txtZipcode, txtCity, txtState, and txtCounty.
2) I want the user to enter in a 'Zip Code' in the textbox labeled: 'txtZipcode'. After the
user presses 'ENTER',
3) I want my VB2008 form to then execute some code (???) which will:
a) lookup the matching city, state and county field values, from the Zipcode (ZipInfo) table;
b) populate each of the three textboxes (labeled txtCity, txtState, txtCounty) on my
VB2008 form, with the corresponding information from the Zipcode table.
I have ATTACHED a picture of the VB2008 form, I've created so far.
I don't know anything, other then to drag the textboxes from the VB2008 toolbox to a blank form. I don't understand ADO, or coding or where to put the code to begin with. I don't know how to reference the connection to the ZipInfo table. I'm not even certain how to connect properly to the data source.
When I asked this question before, I was given a VB 6 solution, which doesn't appear to work with VB 2008.
I would really like to know a VB2008 solution and a C# solution, ideally ... so that I can try and understand how making data connections, connecting to the data and populating forms works in Visual Studio 2008.
I need a 'STEP-BY-STEP' answer, so that I can learn easily. I'm guessing that there are likely many blog readers who would benefit by your answer(s).