By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,098 Members | 1,893 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,098 IT Pros & Developers. It's quick & easy.

Problems when saving a new record

P: 283
Hello all,

I have created two combo boxes that you can enter in a city and a zip code in to. Now i have set them up so that they pull from a list on a table but if the city name or zip code number is not in the list you can add them to the list.

The problem I am having is when it prompts you to add the city name or zip code to the list it is asking you one at a time. So for example if you type in a new city it will stop and ask you if you want to add this to the list and the same with the zip code. Because of this when I go the back end and look at the table it is spacing them out when it saves them.

*brackets and words inside are to symbolize the column name
So instead of the row reading [City] New York [ZipCode] 11111

Its like this [City] New York [ZipCode] blank(row one)
then..........[City] blank [ZipCode] 11111 (row two)

any idea how to keep them together so when you save the new information the city and zip stay together in the same row?
Mar 25 '10 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 3,532
First, what version are you using? In versions up thru 2003 you would open a form based on your city/state/zip table and create a new record, adding all the info at once.

Linq ;0)>

BTW: There are commercially available Access databases that have city/state/zip tables. I think I paid $25 USD for mine two years ago. The advantage is that you know the city you have matches the zipcode. People, even businesses, will give a city name that isn't really attached to the zipcode. Many cities have multiple zips, but each zip only has one city.
Mar 25 '10 #2

P: 283
Hi Linq,

Im using Access 2003. I already have the fields created for the city, state and zip ok. Also i have a list that the form pulls from with about 30,000 citys, that match states and zips.

All I want to do is make it so that when I save the info it all goes in the same row. The reason its not saving in the same row at the moment is because I have the NotInList feature running so it asking you for each box when you type something new if you would like to add it to the list, but I was wondering if there is a way i can make it so once you type in all three that it will find it is not in the list and then add it. I figure this would make it save all the information in the same row.

Is there a way to use the NotInList function in junction with the AfterUpdate?

Apperciate the help :D
Mar 26 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.