Recently I got a solution to a problem of how to use two criteria to do a dlookup. This was to lookup zipcodes using the city and state.
I have realized a problem if a city has more than one zipcode. With this code I will get the first zipcode. How can this code be rewritten so that all the zipcodes come up? Any help would be appreciated.
Code:
Me!txtCompanyZipCode = DLookup("ZipCode", "tblZipCode", "City='" & Me!txtCompanyCity & "' AND State='" & Me!lstCompanyState & "'")
I have realized a problem if a city has more than one zipcode. With this code I will get the first zipcode. How can this code be rewritten so that all the zipcodes come up? Any help would be appreciated.