First, make a datafile containing at least 10 people's names and zip codes. Have at least one zip code that won't appear in the next file. It could look like this:
Sue Green 45667
Joe Gradier 47888
Betty Purple 65471
Now make another datafile containing zip codes and city/states. It could look like this:
45667 Muncie IN
98741 Nowhere CA
Note: a datafile is NOT the same thing as an access database! A datafile is a text file that you can open and read/write data to.
br />Write a program with the following attributes:
A main form, with these attributes:
A text box for first name and a text box for last name that the user can enter data into.
Text boxes to contain the city and state and zip code info you'll look up (the user can not enter anything in these boxes)
Appropriately label each textbox, and put "Address Lookup" header on the form.
Put a button on the form that says "Find".
When the user clicks the "Find" button:
Look up the first/last names in the appropriate datafile to get the zip code. If the person does not exist, throw an error and put an appropriate message on the form
If the user exists, get the zip code and close the file
Use that zip code to go to the other datafile and find the person's city and state
If that zip code doesn't exist, throw an error and put the appropriate message on the form
If everything works right, put the zip code, city and state in the appropriate textboxes