Mark A Matte
markamatte at hotmail.com
Wed Dec 13 12:29:14 CST 2006
I just checked HELP in A97 and A2K and could find no reference to vbNewLine in A2K. I found it in HELP A97. I tested and can use in both. I can't test past 97. Below is the help from 97...Hope it helps. Not sure why the or here(vbNewLine Chr(13) + Chr(10) or Chr(13)) Thanks, Mark A. Matte The following constants are defined in the Visual Basic for Applications type library and can be used anywhere in your code in place of the actual values: Constant Equivalent Description vbCrLf Chr(13) + Chr(10) Carriage returnlinefeed combination vbCr Chr(13) Carriage return character vbLf Chr(10) Linefeed character vbNewLine Chr(13) + Chr(10) or Chr(13) Platform-specific new line character; whichever is appropriate for current platform vbNullChar Chr(0) Character having value 0 vbNullString String having value 0 Not the same as a zero-length string (""); used for calling external procedures vbTab Chr(9) Tab character vbBack Chr(8) Backspace character vbFormFeed Chr(12) Not useful in Microsoft Windows vbVerticalTab Chr(11) Not useful in Microsoft Windows >From: "Charlotte Foust" <cfoust at infostatsystems.com> >Reply-To: Access Developers discussion and problem >solving<accessd at databaseadvisors.com> >To: "Access Developers discussion and problem >solving"<accessd at databaseadvisors.com> >Subject: Re: [AccessD] More on vbCr, vbLf, VbNewLine, and vbCrLf >Date: Wed, 13 Dec 2006 08:52:26 -0800 > >I don't recall it before XP, Susan. > >Charlotte Foust > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins >Sent: Wednesday, December 13, 2006 8:40 AM >To: 'Access Developers discussion and problem solving' >Subject: Re: [AccessD] More on vbCr, vbLf, VbNewLine, and vbCrLf > >I don't suppose anyone knows -- off the top of their head -- when >vbNewLine showed up in Access? I'm going to check the ms library, but I >usually can't find that kind of information. > >Susan H. > >Hi Susan > >That's what is dangerous. One day you may need it elsewhere and you may >be hosed. > >To conclude: Using vbNewLine is the safe way as it is easy to remember >and performs correctly in any Windows environment. >However, in SQL it is not recognized and you have to fall back to >Chr(13) & >Chr(10) for a new line. If that bothers you (not you, the SQL >programmer) because it messes up the SQL, create a tiny function which >is easy to remember and understand: > >Public Function NewLine() As String > NewLine = vbNewLine >End Function > >and use that in your SQL. > >/gustav > > >>> ssharkins at setel.com 13-12-2006 00:00 >>> >I'm just dealing with message text in a message box. :) > >Susan H. > > >Hi Susan > >I meant that no matter what you type, Access will try to display it >correctly. > >However, if you construct a string with the various constants and assign >this to a, say, textbox, you'll for the wrong constants meet the funny >small boxes instead of new lines. Try it. > > >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com > >-- >Internal Virus Database is out-of-date. >Checked by AVG Free Edition. >Version: 7.1.409 / Virus Database: 268.15.9/573 - Release Date: >12/5/2006 > > >-- >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 _________________________________________________________________ Visit MSN Holiday Challenge for your chance to win up to $50,000 in Holiday cash from MSN today! http://www.msnholidaychallenge.com/index.aspx?ocid=tagline&locale=en-us