Type mismatch error when concatenating string

J

Julia B

Hi all

I'm looping through an ADO recordset and creating a text string using string
variables set from recordset values. My recordset is about 35 records.
Everything works fine until I get to record 15 where it crashes and I get the
error 13 type mismatch error and I'm completely at a loss.

Here's the concatenation:

txt = sdFinal & Space(6) & pnFinal & poFinal & cooFinal & qtyFinal & wtFinal
& _
vlFinal & Space(305) & cpcFinal & c1Final & r1Final &
s1Final & _
c2Final & r2Final & s2Final & c3Final & r3Final & s3Final & _
c4Final & r4Final & s4Final & c5Final & r5Final & s5Final &
ac1Final & _
ar1Final & ac2Final & ar2Final & ac3Final & ar3Final &
ac4Final & ar4Final & _
ac5Final & ar5Final & spFinal & addFinal & townFinal &
pcFinal & ctryFinal

I've checked that all variables are of type string (although some of the
variable values are numeric e.g. "45"). None of them have null values, they
either have a value or an empty string. I've tried everything I can think of
and I really can't work out why there would be a problem. The 15th record is
not significantly different to any of the others....... Has anyone any ideas?

Thanks
Julia
 
J

Julia B

Please ignore my post, I missed that one of the variables was an integer! Oh
dear.....

Julia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top