is it possible to put a textbox on a form and set its value like first 250 characters to field1 and the other 250 character to field2 (both fields are in same table) ?
or is there a way to show 500 characters in a textbox and after update it, it seperate as 2 variables and one goes to a field the other one goes to another field?
Thanks
0
Comments
Yes it is possible. You can have the following situations:
1) Textbox having text variable of length 500 as SourceExpression and OnValidate you split the string and assign it to the two table fields
2) 2 texboxes on the form one above the other, both with "Border" property set to "No.", having as SourceExpression the 2 fields from the table.
Regards.
Yes you can do this.
in AfterGetrecord of the form
MyText := Field1 + Field2;
In AfterValidate
Field1 := COPYSTR(MyText,1,250);
Field2 := COPYSTR(MyText,250);
declare MyText as Type Text of length 500
Albert
you can do it with or without coding...i think it is better without coding...even if a little "ugly" for some aspects...
create one long textbox, with focusable = no and soruceexpr = it doesn't care
put the 2 textboxes one near the other...i mean 0pt between them.they must perfectly cover the long textbox you created before
then modify this property for each textboxes (2):
Border =no
sourceexpr = the two fields, one per textbox
then modify this property of the leftmost textbox
-autoenter = yes
-nextcontrol = the ID (or the name, i don't remember) of the rightmost textbox
if you have to manage the editability of field 2 in function of the field 1 (e.g. use f2 only if f1 is longer than 250, let me know)
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
i thought to it when i was thinking about how to simulate "real" multiline feature...
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog