0

I would like to run a query that updates a field's value with whatever is already there but with an "cbt" appended in the end.

For example say there's a field called Currency and for a certain record Currency is "USDCNY", I want the field Details to be updated to whatever is in the field plus "cbt" at the end.

Ideally I would like to add this to the query in the Criteria line of a field called Details. I have tried something like this in the Criteria line of the field called Details. But it isn't working.

IIf([Currency]="USDCNY",Update[DETAILS],+'cbt')
VL-80
  • 4,693

2 Answers2

0

Try using "Select..." vs Select... VBA seems to like quotations before and at the end of the select statements. For example this:

sql = "SELECT * FROM [tbl_Approval] WHERE [Approver]= " & "'" & Me.Disp & "'"

Instead of this:

sql = SELECT * FROM [tbl_Approval] WHERE [Approver]=  & "'" & Me.Disp & "'"
Jeremy
  • 1
0
UPDATE [Table1] Set Details = Details & "cbt" WHERE Currency = "USDCNY"

This is a update query that you can create from the query design. For info of the structure of an update query, visit www.w3schools.com

wbeard52
  • 3,483