You can concatenate numeric values into a string expression without having to
convert their data type first, e.g.
Const conFirst = "Your current Total is "
Const conSecond = " Exclusive of Shipping"
Dim strDisplay As String
strDisplay = conFirst & [InvoiceTotal] & conSecond
Note that constants have been used here for the two literal strings. There
is no need to declare these as variables as they are unchanging. Note the
spaces at the end of the first literal string and start of the second.
Invoice Total is presumably a field in the underlying recordset of the form
or report in whose module the code is executing. Note that in a report's
module you can only refer to a control bound to the field, not directly to
the field in the underlying recordset as you can in a form's module.
Ken Sheridan
Stafford, England
> I want to build a String from several fields (and other variables greated
> within the VB code) some Srings some Integers is there some way of doing
[quoted text clipped - 16 lines]
>
> Thanks
Isis - 15 Mar 2006 01:30 GMT
=?Utf-8?B?S2VuIFNoZXJpZGFu?= <KenSheridan@discussions.microsoft.com>
wrote in news:5EA7D32E-C990-4EF9-BD27-029B557F468D@microsoft.com:
> You can concatenate numeric values into a string expression without
> having to convert their data type first, e.g.
[quoted text clipped - 40 lines]
>>
>> Thanks
Thanks for the reply Ken - I will give this a go.
I will actually be using variables for my text as the text will be
changed under certain circumstances - I tailored the text to make the
point.
Thanks