Hi all,
I wanted to get a textbox value which is in another form, How can i get that.
Actually i have a order form and from there i call
another form called Accessories. Now in that
form Accessories i wanted the value of a textbox
Can anyone help me in doing this?
0
Comments
Pargesoft
I added a function in the called form which returns the value of textbox.
when i debug it is showing the value .. but when i close the second form..i am getting empty value
Reg
Dilip
Yes, you get an empty value because the form is not open anymore.
The value that you are retrieving from the other form, is it stored in a table?
If so, why don't you just read the record instead and get the value that way.
Regards,
Willy
The pattern I have used is this:
Create a function on the called form like SetValues(1,2,3,etc);
Create a function on the called form like GetValues(var1, var2,var3,etc)
On the calling form create a variable for the form CalledForm
On a button or menu choice
Clear(calledform);
Calledform.setvalues(1,2,3,etc); sends any values to be used on the called form
calledform.run or runmodal
you can set the values on the OnOpen trigger
After you close the called form it is still in scope so you can call
Calledform.getvalues(var1,var2,var3,etc); gets any values set in the called form
I hope this helps
Steve
I tried ur code and it worked.
Thank you.
Reg
Dilip.