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!

VBA string concatenation question

Status
Not open for further replies.

ntarikere

Programmer
Jun 20, 2002
5
US
Hi everyone!
I have a visual basic module written against access 97 database table. The purpose of the module is to concatenate few strings and update it back to the database column

The string variable is of type "String"

The database column is of type "Memo"

When I try to update the database column with the value in the string variable, I'm losing some part of the text at the end. This is not a size issue because I have noticed that a longer string is updating back to the database ok but I have problems with a shorter string.
For example
str1 = "aaaaaa" & "bbbbbb" & "cccccccc" is updating as

str1_in_the_database = "aaaaaabbbbbbcccccccc" (updating ok)

str2 = "ddddddd" & "eeeeeeee" is updating as

str2_in_the_database = ""dddddddee" (NOT OK)(losing some part of the text)

(debug.print on str2 looks ok too, so I don't know where exactly is the problem)

Any help is appreciated.
Thanks!
naren
 
Are you putting it in a field which is defined too short?

Rollie E
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top