MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 14th, 2004, 05:53 PM
taffy taffy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 18 taffy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 17 sec
Reputation Power: 0
a "simple" question about text box

Guys -
I have a textbox that I will store information from a variable. The textbox will store a form of report based on some calculated figure. I want the following items to be displayed:

Contact made on June 10 : 15
Contact made on June 11 : 1
Contact made on June 12 : 23


The problem is that I cannot get each item to start in a new line. I use chr(10) between them but it does not work. I have no idea how many lines of items will be displayed, as this information is stored in a loop. I keep getting this result:


Contact made on June 10 : 15 Contact made on June 11 : 1Contact made on June 12 : 23


How can I get each item to start in a new line in the textbox?
this is a sample of the code that I use:
strCnt = "Contacts made on " + Str(dtee) + " : " + Str(dtee_amt)
strRep = strRep + Chr(10) + strCnt


and I am using MS Access.

Thanks

Taffy

Reply With Quote
  #2  
Old June 14th, 2004, 09:57 PM
access_user access_user is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 13 access_user User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
try a carraige return instead

taffy, I have not used these before, but I have two suggestions that would be VERY easy to try out. First, I have usually seen these in this format Chr$(10) and Chr$(13) **note the $ after Chr**,and second to try is to replace the linefeed character with the carraige return character Chr$(13). Hope one of these helps. I would have tried them out before suggesting them, but I do not have access to a db just now.

best of luck.

mike

Reply With Quote
  #3  
Old June 14th, 2004, 10:26 PM
brightlight brightlight is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 371 brightlight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 32 m 27 sec
Reputation Power: 5
Hi Taffy,

I'm not very sure this can be achieved or not in the text box but alternatively u can use text area which can display the newlines and will allow scrolling
__________________
Regards,
Brightlight

Reply With Quote
  #4  
Old October 28th, 2004, 08:28 AM
msp_cbe msp_cbe is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Location: Gaborone, Botswana
Posts: 12 msp_cbe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m
Reputation Power: 0
Thumbs up

Hi!

You need to do two things to achive this:

1. Set the multiline property to true.
2. Use VBCrLF instead of CHR(10).

Cheers,

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > a "simple" question about text box


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway