A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Urgent!!! Zip code Look Up



 
 
Thread Tools Display Modes
  #1  
Old November 30th, 2006, 04:54 PM posted to microsoft.public.access.gettingstarted
robpiolink
external usenet poster
 
Posts: 1
Default Urgent!!! Zip code Look Up

I have 2 tables. Table1 has Zip Codes from many cities, also table1 has
a field(yes/no) that says "houston". Table2 has zip codes from houston
city. I want to be able tu run table2 against table1 to compare
zipcodes and if table1 has a zipcode that match table2, i want to
update the field(yes/no).
Any macros or queries???

Thank you

  #2  
Old November 30th, 2006, 05:51 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default Urgent!!! Zip code Look Up

UPDATE Table1
SET Houston = True
WHERE Table1.ZIP in
(SELECT Table2.Zip FROM Table2)

OR

UPDATE TABLE1 INNER JOIN Table2
On Table1.Zip = Table2.Zip
SET Houston = True

"robpiolink" wrote in message
oups.com...
I have 2 tables. Table1 has Zip Codes from many cities, also table1 has
a field(yes/no) that says "houston". Table2 has zip codes from houston
city. I want to be able tu run table2 against table1 to compare
zipcodes and if table1 has a zipcode that match table2, i want to
update the field(yes/no).
Any macros or queries???

Thank you



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:42 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.