Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ammar Hadi
  Where is Ammar Hadi?
 Al-Samawah
 Iraq
 Ammar Hadi
 To: Derrick Bruce
  Where is Derrick Bruce?
 Charlestown
 Indiana - United States
 Derrick Bruce
 Tags
Subject: RE: Carriage Return Symbol Stored in Data
Thread ID: 228691 Message ID: 228693 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Wednesday, May 20, 2009 9:03:14 PM         
   


> First time I have run into this - I need to eliminate the ability to end up with that little carriage return character that can show up from Edit Box entries. Writing data back to a tab delimited text file and it is wrecking things. I don't want to have to parse out the strings looking for it - just elimate the ability for it to save.
>
> I thought the autolinefeeds would do it or that there would be an option similar, but no such luck to this point.
>
> I can handle the clean up and do it the long hand way - just wondering if there was an option I was missing either on the properties of the edit box or something on the database side to just not save the character. Thanks.
>
> D

Hi Derrick

You can use the keypress event to eliminate the Enter in the editbox:

* KeyPress Event
LPARAMETERS nKeyCode, nShiftAltCtrl

IF nKeyCode=13
 NODEFAULT
ENDIF


in such case Enter will do nothing.

if you want to replace the Enter with another key. See this code I replace the Enter with 5 spaces :-)

LPARAMETERS nKeyCode, nShiftAltCtrl

IF nKeyCode=13
 FOR lnCount=1 to 5
  KEYBOARD '{SPACEBAR}'
 ENDFOR
 NODEFAULT
ENDIF


Hope this helps

Ammar Hadi ................IRAQ

My Foxite Weblog

---------------
I I I really love foxite
___________________________

ENTIRE THREAD

Carriage Return Symbol Stored in Data Posted by Derrick Bruce @ 5/20/2009 8:42:24 PM
RE: Carriage Return Symbol Stored in Data Posted by Ammar Hadi @ 5/20/2009 9:03:14 PM
RE: Carriage Return Symbol Stored in Data Posted by Derrick Bruce @ 5/21/2009 4:30:11 PM
RE: Carriage Return Symbol Stored in Data Posted by Camil Ghircoias @ 5/20/2009 9:04:44 PM
RE: Carriage Return Symbol Stored in Data Posted by Derrick Bruce @ 5/21/2009 4:39:16 PM
RE: Carriage Return Symbol Stored in Data Posted by Stefan Wuebbe @ 5/21/2009 4:48:58 PM
RE: Carriage Return Symbol Stored in Data Posted by Derrick Bruce @ 5/21/2009 7:51:05 PM