Results 1 to 10 of 10
  1. #1
    gykiang is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    47

    Using & Chr(13) & Chr(10) &

    In my Access Form, I have to leave a blank space between 2 text fields in a group of fields. In my code, I'm using Chr(13) & Chr(10) which works out fine upon updating and combining the group of text fields into a single text box.



    However, due to several fields that need such blank space in between and because of space limitation of the FORM, I wonder if there is any solution to reduce the fontsize of the blank space by just changing code of Chr(13) & Chr(10) and without affecting the regular fontsize of the text fields. For example, Fontsize of Text is 8 whereas the space between the Texts is 5.

    Thanks for any guide provided.

    Regards
    Kiang

  2. #2
    gykiang is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    47
    Sorry for error in my explanation. I'm using :
    & Chr(13) & Chr(10) & Chr(13) & Chr(10) &

    that is 2 times of & Chr(13) & Chr(10) & to obtain the blank space.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I have to say no.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    You could change the text control from plain to RTF and then use html tags to change the font size. You could use size = 1 for your line feeds and then size = 3 for your other text, for instance.
    http://www.w3schools.com/tags/att_font_size.asp

  5. #5
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    vbCRLF
    is the same as
    Chr(13) & Chr(10)

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by ranman256 View Post
    vbCRLF
    is the same as
    Chr(13) & Chr(10)
    Chr(13) & Chr(10) will work in VBA, still.

    However, vbcrlf is specific to VBA and will not be recognized by RTF or HTML.

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I think for a textbox to be RTF, it must be bound to a field that is set as RTF.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by June7 View Post
    I think for a textbox to be RTF, it must be bound to a field that is set as RTF.
    A while back, Linq mentioned the HTML thing and I hunted down the RTF property for the unbound textbox control. Pretty cool stuff if you ask me.




    .
    Click image for larger version. 

Name:	RichTextProperty.jpg 
Views:	7 
Size:	28.1 KB 
ID:	18030

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I just tried to set that for a textbox bound to a field that is not set as RTF and wouldn't allow the RTF setting. But you are right, it does allow for an UNBOUND control.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #10
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by June7 View Post
    ...and wouldn't allow the RTF...
    That is good to know.

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums