Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update a field from another?

Status
Not open for further replies.

Skins64

Technical User
Oct 11, 2005
32
US
I have a field called "Dear" which contains "Mr Smith" "Mr. Jones" etc....This field also contains preferred names like Bob or Ted or Buck.

I need to update a field called "Preferred Name" with contacts who have a Bob or Buck etc in the "Dear" field.

Do not want to update preferred name with names that begin with Mr.

Hopes this makes sense.

Please help.

Thanks
 
and what have you tried so far?

Some samples of your code will help us to explain to you what you need to do, and what you may be doing wrong if you do not get your desired results.



Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Try a clause like
Code:
Where Left([Dear],3) NOT IN ('Mr.', 'Mr ', 'Mrs', 'Ms ', 'Dr.') ... etc.
 
I have only tried to update the field, which I can do with an update query, but this adds everything in the Dear field to the Preferred Name field...how do I just take the names that do not begin with Mr?
 
Could not get that code to work.

I guess I need to write a string that says...when "Dear" DOES NOT contain Mr. Mrs. Ms. Dr. etc update "Preferred Name" field.

???
 
Assuming that both fields are in the same table ...
Code:
UPDATE myTable SET [Preferred Name] = Dear
Where Left([Dear],3) NOT IN ('Mr.', 'Mr ', 'Mrs', 'Ms ', 'Dr.')
 
Can't get it to work, but thanks anyway!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top