Multiple records in a field. (1 Viewer)

Tracy

Registered User.
Local time
Today, 02:57
Joined
Oct 19, 2001
Messages
71
Hello, can anyone please help as I've completely run out of ideas!

I have a text box in a report footer, and in that single text box, I need to display all the records in a table. The table has around 5 records in it.

I can create a string concatenating all the records. That's no problem, but how can I display it in the field using a carriage return after each record, so that they all appear in a column underneath one another?

I tried:

strRecords = strRec1 & chr$(13) & strRec2 & chr$(13) & strRec3

but the chr$(13) just shows a symbol even though it's the character code for a carriage return.

Any ideas anyone?
Thanks
Tracy
 

Jon K

Registered User.
Local time
Today, 02:57
Joined
May 22, 2002
Messages
2,209
Try this:-

= strRec1 & chr(13) & chr(10) & strRec2 & chr(13) & chr(10) & strRec3


i.e. a carriage return and a line feed
 
R

Rich

Guest
Since your in vba you can also use & vbCrLf &
 

Tracy

Registered User.
Local time
Today, 02:57
Joined
Oct 19, 2001
Messages
71
Thank you bot for your help. Works a treat!
Tracy
 

Tracy

Registered User.
Local time
Today, 02:57
Joined
Oct 19, 2001
Messages
71
And finally....

Any ideas on how to create a second column in the same field (poss using chr(??)).

Thanks
Tracy
 

sambo

Registered User.
Local time
Yesterday, 18:57
Joined
Aug 29, 2002
Messages
289
Insert another text box to the right of your existing one and fill this with the other values.

Better yet, just use a continuous form and format the controls however you want.

Rich.. I'm surprised you didn't suggest this given your history for contempt towards inefficiency.
 

Users who are viewing this thread

Top Bottom