Values in Memos

Hello all,
i have got plenty memos with float values in it. I need to add these values.
ShowMessage(FloatToStr(Memo1.Value)) gives an empty Message back. XY := StrToFloat(Memo1.Text) gives an error back (xx,xx is a invalid floating point value).

How can i get the values of the Memos?

Thx 4 help.

Comments

  • edited 10:20PM
    Hello all,
    i have got plenty memos with float values in it. I need to add these values.
    ShowMessage(FloatToStr(Memo1.Value)) gives an empty Message back. XY := StrToFloat(Memo1.Text) gives an error back (xx,xx is a invalid floating point value).

    How can i get the values of the Memos?

    Thx 4 help.

    Hi.

    The 'value' property I think is only available inside the OnGetValue-event. Else you shold access the text property.

    Try: ShowMessage(Memo1.text);
  • edited April 2013
    Hi,
    thanks 4 your anwser, but this didn't help.
    There is no OnGetValue-event to choose on Memos, DetailData, MasterData.
    In all other events (onAfterPrint, onBeforePrint, onAfterData,...) the 'value' property isn't available too.

    edit:
    showmessage(memo1.text) returns the correct memo-content.

    edit2:
    if i manually fill values in the memo, memo1.values is empty.
    if the memo receives the values from DetailData or MasterData, the value property is accessable. crazy huh?
  • edited 10:20PM
    There is no OnGetValue-event to choose on Memos, DetailData, MasterData.

    Sorry about that. I meant OnAfterData-event.
    And then, the value only returns what comes from fields or variables inside the memo, not from text.
    Example: '[mydb."myfield"] my text' in a memo will return the contens of mydb."myfield" as value (and ignore 'my text').
  • gordkgordk St.Catherines On. Canada.
    edited 10:20PM
    AND if the memo contains more than 1 field or expression only the last one processed is in the value

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.