Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

capitalized "Memo" with nothing in it.

Status
Not open for further replies.

breveR

Programmer
Nov 16, 2001
18
0
0
US
Some of the Memo fields in my foxpro table are capitalized yet there is no data in them. When I type some data in them then take the data out, it returns to the lower case "m" indicating that it is an empty memo field. What I need is a script to loop through the table and identify "Memo" fields that are blank and set them back to thier original state. but Im not sure how to check for a capitol "M". Any help would be greatly appreciatied.
 
The capital versus lower case "M" could be an instance of a space being inside the memo field. That will still cause the memo field to display Memo.

As far as setting the work to the correct case, the easiest way would be to REPLACE ALL <memo field> WITH ALLTRIM(<memo field>)

red
 
Thanks. Ill try that. Its a big table so it might take a while.
 
Wait a sec. How do I know that this statement is going to fix my hosed memos?. Is there a any way I can intentionally break my memo field just for testing purposes. So that I can see more acuratley what happens after I run the statement. So really my question is, how can I make a &quot;Memo&quot; field with nothing in it.
 
HI BreveR
1. To make a memo field blank, you can use the code.
REPLACE ALL myMemo WITH &quot;&quot;
But this will replace all the memo fields with a blank and will erase any data init.
2. If you want to only blank out empty spaces, then..
REPLACE ALL MyMemo WITH ALLTRIM(myMemo)
This will trim out leading and trailing spaces and so, will leave the memo fields blank in case only spaces are occuping it.
3. To clear the bloating of memo fields,
USE myTable IN 1 EXCLUSIVE
PACK MEMO

Hope this helps :) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Never mind. I found a way to break it. I just zapped a copy of my table and copied the empty fpt over my existing fpt. and there it was, capital &quot;M&quot; with not even a space inside the field. Sure enough, the replace all command works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top