|
-
Jun 15th, 1999, 09:07 PM
#1
Thread Starter
New Member
I have created a MS Access Database and a Data-entry form. In order to make it less time consuming to the user and avoid errors, I would like to have the State, Zip, and County automatically fill in when the user enters the City. I was able to do this with a Select Case statement. But...if other cities need to be added later, this will require recoding within the program. I would like to create a separate table in the database to store the City, State, Zip, and County fields and search for the needed fields when they city is entered. Is there any way to do this with a Search or Select Statement???? I'm getting a little aggravated with the Help menu. Thanks!
-
Jun 16th, 1999, 08:25 AM
#2
New Member
testermans,
I would definitely invest in creating another table which holds this sort of information and having another form in your program for an administrator to have access to add new cities, and relevent information.
The best way to go about filling in all these fields automatically is to track when the field has lost_focus. When this occurrs set up a new recordset looking at the City_Information table. Search for the city, and then grab all the information out of it.
EG>
SELECT * FROM City_Info WHERE [City] = '" & txtCity.Text & "'"
This will select all the information from the table on only that one city.
Give it a go. If your require any more help, get in contact!
------------------
Jeremy Powell
Powell Consulting Services Pty Ltd
Australia
EMail [email protected]
Ph +61 3 97958156
Fx +61 3 9795 8156
http://www.users.bigpond.com/jimp/index.html
-
Jun 16th, 1999, 06:40 PM
#3
Thread Starter
New Member
Thanks for the info. Will try it out.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|