MemVars and Memo? 
Author Message
 MemVars and Memo?

Hi,

I have 20 memvars that each hold a sentance from a questionaire.  I want to
add them one line at a time to a memo field.

Right now the only thing I can up with is to create 20 fields, one for each
variable and copy them to a text file, then append the text file to the
memo.

I really dont want the extra fields in this table.

Is there a more effective way to do this?

Wilson



Wed, 31 Aug 2005 01:42:19 GMT  
 MemVars and Memo?
I recommend that you do it all at once due to the way memo fields are
stored.

REPLACE MyMemo WITH String1 + String2 + String3 ...

--
Craig Berntson
MCSD, VisualFoxPro MVP
www.craigberntson.com
Salt Lake City Fox User Group
www.slcfox.org
www.foxcentral.net


Quote:
> Hi,

> I have 20 memvars that each hold a sentance from a questionaire.  I want
to
> add them one line at a time to a memo field.

> Right now the only thing I can up with is to create 20 fields, one for
each
> variable and copy them to a text file, then append the text file to the
> memo.

> I really dont want the extra fields in this table.

> Is there a more effective way to do this?

> Wilson



Wed, 31 Aug 2005 01:53:31 GMT  
 MemVars and Memo?
Craig,

How do get the line feed or carrage return in?

Wilson


Quote:
> I recommend that you do it all at once due to the way memo fields are
> stored.

> REPLACE MyMemo WITH String1 + String2 + String3 ...

> --
> Craig Berntson
> MCSD, VisualFoxPro MVP
> www.craigberntson.com
> Salt Lake City Fox User Group
> www.slcfox.org
> www.foxcentral.net



> > Hi,

> > I have 20 memvars that each hold a sentance from a questionaire.  I want
> to
> > add them one line at a time to a memo field.

> > Right now the only thing I can up with is to create 20 fields, one for
> each
> > variable and copy them to a text file, then append the text file to the
> > memo.

> > I really dont want the extra fields in this table.

> > Is there a more effective way to do this?

> > Wilson



Wed, 31 Aug 2005 02:48:23 GMT  
 MemVars and Memo?
Hi Wilson:

I imagine there are a lot of ways to do this task.  If you need to place
the values in a text file before placing them into the memo field, you can
use the StrToFile() function.  For example:

X="Hello "
Y="world"
? StrToFile(x+y,"test.txt")
APPEND MEMO MemoFieldName FROM Test.txt

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

Quote:
>I recommend that you do it all at once due to the way memo fields are
>stored.
>REPLACE MyMemo WITH String1 + String2 + String3 ...
>--
>Craig Berntson
>MCSD, VisualFoxPro MVP
>www.craigberntson.com
>Salt Lake City Fox User Group
>www.slcfox.org
>www.foxcentral.net


> Hi,

> I have 20 memvars that each hold a sentance from a questionaire.  I want
to
> add them one line at a time to a memo field.

> Right now the only thing I can up with is to create 20 fields, one for
each
> variable and copy them to a text file, then append the text file to the
> memo.

> I really dont want the extra fields in this table.

> Is there a more effective way to do this?

> Wilson



Wed, 31 Aug 2005 02:56:21 GMT  
 MemVars and Memo?
Lee,

1.  First name? =
2.  Last name? =
3.  Gender: M/W? =
..
..
..

There is a function that gets line 1 and stores it to cline and keeps
repeating.
I need to keep adding each line to the memo field as its processed.
Can I do  repeat  StrToFile(cline,"test.txt") and get new lines each time in
the memo field?


Quote:
> Hi Wilson:

> I imagine there are a lot of ways to do this task.  If you need to place
> the values in a text file before placing them into the memo field, you can
> use the StrToFile() function.  For example:

> X="Hello "
> Y="world"
> ? StrToFile(x+y,"test.txt")
> APPEND MEMO MemoFieldName FROM Test.txt

> I hope this helps.

> This posting is provided "AS IS" with no warranties, and confers no
rights.

> Sincerely,
> Microsoft FoxPro Technical Support
> Lee Mitchell

> >I recommend that you do it all at once due to the way memo fields are
> >stored.

> >REPLACE MyMemo WITH String1 + String2 + String3 ...

> >--
> >Craig Berntson
> >MCSD, VisualFoxPro MVP
> >www.craigberntson.com
> >Salt Lake City Fox User Group
> >www.slcfox.org
> >www.foxcentral.net



> > Hi,

> > I have 20 memvars that each hold a sentance from a questionaire.  I want
> to
> > add them one line at a time to a memo field.

> > Right now the only thing I can up with is to create 20 fields, one for
> each
> > variable and copy them to a text file, then append the text file to the
> > memo.

> > I really dont want the extra fields in this table.

> > Is there a more effective way to do this?

> > Wilson



Wed, 31 Aug 2005 03:13:42 GMT  
 MemVars and Memo?
Wilson,
#DEFINE CRLF chr(13)+chr(10)

Rick

Quote:

> Craig,

> How do get the line feed or carrage return in?

> Wilson



> > I recommend that you do it all at once due to the way memo fields are
> > stored.

> > REPLACE MyMemo WITH String1 + String2 + String3 ...

> > --
> > Craig Berntson
> > MCSD, VisualFoxPro MVP
> > www.craigberntson.com
> > Salt Lake City Fox User Group
> > www.slcfox.org
> > www.foxcentral.net



> > > Hi,

> > > I have 20 memvars that each hold a sentance from a questionaire.  I want
> > to
> > > add them one line at a time to a memo field.

> > > Right now the only thing I can up with is to create 20 fields, one for
> > each
> > > variable and copy them to a text file, then append the text file to the
> > > memo.

> > > I really dont want the extra fields in this table.

> > > Is there a more effective way to do this?

> > > Wilson



Wed, 31 Aug 2005 03:14:40 GMT  
 MemVars and Memo?
Hi Wilson,

See if this does what you want:

CREATE CURSOR Test (Field1 M)

String1 = "Hello world!"
String2 = "FoxPro Rocks!"
String3 = "I'm learning something new."
m.Field1 = ""

FOR lnCount = 1 TO 3
 lcMemvarName = "String" + TRANSFORM(lnCount)
 m.Field1 = m.Field1 + &lcMemvarName + CHR(13)
ENDFOR

INSERT INTO Test FROM MEMVAR

You can also read the Help about the STRTOFILE() command to see how that
method works.

--
Cindy Winegarden  MCSD, Microsoft Visual FoxPro MVP

http://msdn.microsoft.com/vfoxpro  http://foxcentral.net


Quote:
> I have 20 memvars that each hold a sentance from a questionaire.  I want
> to
> add them one line at a time to a memo field.



Wed, 31 Aug 2005 12:17:48 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Insert Memvars to view or table

2. MemVars

3. : Changing memvars to uppper case

4. adding memvars

5. Scattering memvars

6. cating memvars

7. First 4 bytes of memo file (fpt) Missing/invalid memo file

8. Converting Memos/Memo fields

9. Indentation of memo fields - reports vs. modify memo

10. contents are selected on a memo field that is tabbed into and user start typing erasing all in memo

11. Memo field in cursor table displays 'memo' instead of contents...

12. More detail on how to extract memo field into another memo field?

 

 
Powered by phpBB® Forum Software