Simple Query Question (I'm admittedly a newbie)
I have been looking for an answer to what I think is a simple question, but since I'm knew to this I don't think I've found an answer.
I have a table (tblZipCode) that I imported that contains some 74,000 entries. This table has five fields.
lngZipID (primary key)
chrZipCode
chrCity
chrState
chrAreaCode
My use for this table is as follows. When a user enters a zip code into the zip field on my ford, I want to autopopulate the state, city, and are code fields on my form.
Currently the table has some duplicate values in the zip code field and the city field. Example of two different situations.
lngzipID.......chrZipCode.......ChrCity.....................State.............AreaCode
...1................11111..........Bloomfield...................MI...................517
....2...............11111.........East Bloomfield.............MI....................343
....3...............11111..........North Bloomfield...........MI.....................517
I've having a problem with my dlookup statement to populate these fields on my form:
chrCity
chrState
chrAreaCode
I'm trying to accomplish two things.
1) Query my tblZipCodes to make sure all duplicate entries are necessary and not typos.
2) Determine how to make these values autopopulate. Is there a way to have a message box that would allow the user to choose the appropriate city or area code depending on the situation?
Thanks for any help...I'm learning quickly, but not quickly enough.....
Matt
I have been looking for an answer to what I think is a simple question, but since I'm knew to this I don't think I've found an answer.
I have a table (tblZipCode) that I imported that contains some 74,000 entries. This table has five fields.
lngZipID (primary key)
chrZipCode
chrCity
chrState
chrAreaCode
My use for this table is as follows. When a user enters a zip code into the zip field on my ford, I want to autopopulate the state, city, and are code fields on my form.
Currently the table has some duplicate values in the zip code field and the city field. Example of two different situations.
lngzipID.......chrZipCode.......ChrCity.....................State.............AreaCode
...1................11111..........Bloomfield...................MI...................517
....2...............11111.........East Bloomfield.............MI....................343
....3...............11111..........North Bloomfield...........MI.....................517
I've having a problem with my dlookup statement to populate these fields on my form:
chrCity
chrState
chrAreaCode
I'm trying to accomplish two things.
1) Query my tblZipCodes to make sure all duplicate entries are necessary and not typos.
2) Determine how to make these values autopopulate. Is there a way to have a message box that would allow the user to choose the appropriate city or area code depending on the situation?
Thanks for any help...I'm learning quickly, but not quickly enough.....
Matt
Last edited: