Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a utilty form with a table parameter
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01470340
Message ID:
01470345
Views:
58
>If you want to call a Form whose purpsoe is solely to give you a larger space to see what is in your notes (Mem field) Edit Box, and you call it like this: DO FORM frmNotes WITH "TableName"
>
>and you go into the form called frmNotes into the INIT procedure, how would you code a reference of the table and the Memo field you want to view in the EditBox?
>
>I did the following, but it isn't working: (The .Notes references the "Notes" field in the table.)
>If the table and the field were referenced as: Hardware.Notes, then how would you reference this generically in the below code?
>
>LPARAMETERS tcTableName
>
>WITH This
>   .edtNotes.Value = (tcTableName) + ".Notes"
>ENDWITH
Why not just MODIFY MEMO?
About your form:
In the calling routine:
oForm = CREATEOBJECT("YourFormWithEditBoxClass")
oForm.SetEditBoxValue(YourTable.MemoField)
oForm.Show()


****YourFormWithEditBoxClass.SetEditBoxValue code
LPARAMETERS lcMemoVaue
this.Edit1.Value = m.lcMemoValue
Other way, but you must be sure that the form with Editbox uses default datasession, not primary one:
oForm = CREATEOBJECT("YourFormWithEditBoxClass")
oForm.SetEditBoxValue("YourTable")
oForm.Show()


****YourFormWithEditBoxClass.SetEditBoxValue code
LPARAMETERS lcFileName
this.Edit1.Value = EVALUATE(lcFileName+".Notes")
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform