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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a form with Field1 and Field

Status
Not open for further replies.

reinaldo

Programmer
Mar 29, 2001
31
0
0
US
I have a form with Field1 and Field2. Is there a way that with a pushbutton I can store the value of field1 and the value of field2 in a library, and the with the push of another button get them to dispay in another field.

Some sample code would really help.

Thanks All
 
reinaldo,

I'm not sure I'm following your question, but here goes:

Code:
uses ObjectPAL
   :LIBS:LIBRARY1.LSL
endUses

var
   numValue1,
   numValue2  Number
   libMyVars  Library
endVar

   libMyVars.open( "LIBRARY1" )
   numValue1 = uifField1.Value
   numValue2 = uifField2.Value
   libMyVars.saveVars( numValue1, numValue2 )
   uifField3.Value := numValue1 + numValue2

This example assumes, of course, that your library contains a method called saveVars that does something with the values of numValue1 and numValue2. The uifFieldX references indicate field objects on your forms.

hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top