470,612 Members | 2,086 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,612 developers. It's quick & easy.

Reading page breaks

I am trying to create a form that allows users to paste information (a full adress) from an other application (xml based ) into an access 97 text box - then use vba code to split the string into substrings and copy them to other text boxes using the (existing) page breaks that are in the text string but unfortunately i cannot work out how to refer to the breaks in code, they do show up as double square characters if I pass the text to a string but I cannot work out how to refer to these breaks any Ideas?
Jul 15 '07 #1
2 2087
puppydogbuddy
1,923 Expert 1GB
I am trying to create a form that allows users to paste information (a full adress) from an other application (xml based ) into an access 97 text box - then use vba code to split the string into substrings and copy them to other text boxes using the (existing) page breaks that are in the text string but unfortunately i cannot work out how to refer to the breaks in code, they do show up as double square characters if I pass the text to a string but I cannot work out how to refer to these breaks any Ideas?

Try the search and replace using the ascii code....... Chr(12) is the ascii code for page break
Jul 15 '07 #2
NeoPa
32,300 Expert Mod 16PB
I am trying to create a form that allows users to paste information (a full adress) from an other application (xml based ) into an access 97 text box - then use vba code to split the string into substrings and copy them to other text boxes using the (existing) page breaks that are in the text string but unfortunately i cannot work out how to refer to the breaks in code, they do show up as double square characters if I pass the text to a string but I cannot work out how to refer to these breaks any Ideas?
As you say they are double square brackets, I assume that they are actually new line codes rather than page-break codes. A new line is actually (on PCs anyway) a Carriage Return / Line Feed sequence. In VBA this can most easily be referred to using the predefined value vbCRLF. Of course it may well be a Form Feed character, in which case a Chr(12) (or vbFormFeed) would match it for you.
Expand|Select|Wrap|Line Numbers
  1. Decimal Hexadecimal VBA code    Description
  2.   10      &H0A      vbLF        Line Feed
  3.   13      &H0D      vbCR        Carriage Return
  4.                     vbCRLF      Carriage Return / Line Feed
  5.   12      &H0C      vbFormFeed  Form Feed
Jul 15 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Christopher Glaeser | last post: by
4 posts views Thread by Xah Lee | last post: by
1 post views Thread by Scott | last post: by
4 posts views Thread by nightflyer | last post: by
2 posts views Thread by darrel | last post: by
1 post views Thread by kaosyeti | last post: by
reply views Thread by bblue | last post: by
5 posts views Thread by Andreas Prilop | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.