Updating a field with the + as part of the value

VegaLA

Registered User.
Local time
Today, 06:20
Joined
Jul 12, 2006
Messages
101
Hi all,
I am trying to update the value of a field from say, "Word" to "Test120+". I am using the SQL code as below....

UPDATE tblTable SET tblTable.Field = "Test120+"
WHERE (((tblTable .Field)="120") AND ((tblCurrent.Field02)="TT"));

But the end results are that the value has been changed to just Test120 !! The plus (+) sign has been excluded. Is there anyway I can force the plus sign to be used in this update query or has Access some sort of bug because the plus sign is used as an arithmetic character that prevents it from being used as a value in a query ?

Any workarounds or advice greatly appreciated.

Thanks in advance,
Mitch....
 
Well for one you shouldn't use mathematical operators (or reserved words either) in field names or object names. Access is a bit picky about that and it will cause you a lot of grief if you continue on that path. Change the name to Test120Plus and display it later the way you want.
 
Thanks for ther reply Mr Larson.

Yeah i'm quite particular with the naming of fields but thats not the problem I am currently facing, its the value of a field. I want to use the + sign in the value. If, however that's not possible i'll have to go without but the reason I want it in the value is because thats what the value should be.

Thanks again,

Mitch....
 
try changing the text to "test+120", to see if it is really taking the value from your SQL. You can certainly use the plus sign in text fields
 
You can also try using Chr(43):

UPDATE tblTable SET tblTable.Field = "Test120" & Chr(43)
 

Users who are viewing this thread

Back
Top Bottom