[AccessD] Label vs text box and carriage return issue.

Darryl Collins Darryl.Collins at coles.com.au
Sun Jun 1 20:59:07 CDT 2008



Stuart,

Next time I fly north to Asia I will try and get the pilot to drop out a case of whatever you like over PNG with a thank you card attached!  Pity I don't work with Exxon anymore, otherwise I may have been able to scam a work excursion and deliver it personally.

many thanks, a simple solution and works perfectly.

regards
Darryl.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Stuart
McLachlan
Sent: Monday, 2 June 2008 11:54 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Label vs text box and carriage return issue.


Cr and LF are two different characters.  You need them both to throw a line the text box.

Use either   vbCRLF     or       Chr$(13) & CHR$(10)


-- 
Stuart


On 2 Jun 2008 at 11:40, Darryl Collins wrote:

> 
> 
> Hey guys and gals.
> 
> Whilst most of you are mooching about on Sunday, it is Monday here in
> Deep South Oz (urrrrgh) and I am trying to get a report to behave. 
> 
> I am using Labels which I want to populate with a list returned from a
> query.  Now I have the query working great, and I have the data being
> populated into the labels, but I cannot get the damn carriage return
> working correctly.  I have tried Chr(10), vbCr and vbLf.  All work in
> that they put in a Carriage return character, but it doesn't actually
> write to the label with carriage returns functioning - still write the
> data in a single line. 
> 
> I want:
> Alpha
> Beta
> Gamma
> Delta
> 
> NOT:
> "Alpha Beta Gamma Delta" (with the carriage return char showing in the spaces).
> 
> ' ------------- Code Start -------------------
> 
> ... yada yada yadah...
>     
>                     If (rsActClone.RecordCount) > 0 Then
>                         sProgText = ""
>                         Do While Not rsActClone.EOF
>                             n = n + 1
>                             If n > rsActClone.RecordCount Then
>                                 Exit Do
>                             End If
>                             
>                             sProgText = rsActClone!ProgName.Value
>                             sANS = sANS & sProgText & vbLf '<-- THIS BIT HERE IS BOTHERSOME
>                             rsActClone.MoveNext
>                         Loop
>                     End If
>                 End If
>                 
> ... and so on....
> 
> ' ------------ End Code ----------------------
> 
> This email and any attachments may contain privileged and confidential information and are intended for the named addressee only. If you have received this e-mail in error, please notify the sender and delete this e-mail immediately. Any confidentiality, privilege or copyright is not waived or lost because this e-mail has been sent to you in error. It is your responsibility to check this e-mail and any attachments for viruses.  No warranty is made that this material is free from computer virus or any other defect or error.  Any loss/damage incurred by using this material is not the sender's responsibility.  The sender's entire liability will be limited to resupplying the material.
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

This email and any attachments may contain privileged and confidential information and are intended for the named addressee only. If you have received this e-mail in error, please notify the sender and delete this e-mail immediately. Any confidentiality, privilege or copyright is not waived or lost because this e-mail has been sent to you in error. It is your responsibility to check this e-mail and any attachments for viruses.  No warranty is made that this material is free from computer virus or any other defect or error.  Any loss/damage incurred by using this material is not the sender's responsibility.  The sender's entire liability will be limited to resupplying the material.




More information about the AccessD mailing list