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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perform string manipulation and add column

Status
Not open for further replies.

cancer2006

Programmer
Aug 25, 2006
45
US
I have two fields thtat needs to be identical. the data in these two fields is coming from the third field. for example

COL1 COL2 COL3
xx1234 999-99-9999 xx1256

the end result should be
COL1 COL2 COL3
bb9999 999-99-9999 bb9999 where b= blank space


I am using ACCESS 97. I am thinking, that I have to use visual basic. recordset data type. But how am I going to update fields. Can I use SQL statements from Visual Basic?
Can you point me in the right direction please. Thanks.
 
Code:
db.Execute "UPDATE myTable " & _
"SET COL1 = '  ' & right(COL2,4), COL3 = '  ' & right(COL2,4)"
where "db" is a database (DAO) or connection (ADO) object.

But what useful information is there in two fields that have (and apparently MUST have) identical values?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top