Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: surinder singh
  Where is surinder singh?
 mumbai
 India
 surinder singh
 To: Geovannie Ariola
  Where is Geovannie Ariola?
 Quezon City
 Philippines
 Geovannie Ariola
Subject: RE: Grid value to textbox of another form
Thread ID: 183016 Message ID: 183049 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Friday, July 11, 2008 12:12:32 PM         
   



> >
>
> Sorry! I think I have to be specific with my question?
>
> This is the scenario:
>
> I have this main form with a textbox, a search button and an execute button. The other other form is the search form.
>
> This is how I want it to work:
> 1. The user will open the form then click the search button then the second form will appear (search form with a gridbox in it).
> 2. When the second form appears the user will select (ex. an item number). On the selected value the user will double click it and the value of the grid will go to the textbox of the main form and the search form (2nd form) will disappear.
>
> This is my code but non of the grid value goes to the textbox of the main form. See below code:
>
> Main form (as PO)
>
> search button click:
> DO FORM \forms\search.scx
>
>
> On the search form.
>
> grid.double click:
> po.text1.value = thisform.grid1.column1.text1.value
> thisform.release
>
>
>
> Am I missing something with my code.
>
> Please help.
>
> Thank you.
>
>
> Vannie

you can do it in multiple ways, one is this:
1. when you call search form on button's click declare a private variable say pcReturnValue
*commandbutton.click
private pcReturnValue
pcReturnValue= ""
do form search
thisform.text1.value = pcReturnValue
*on your search form grid's doubleclick
pcReturnValue = thisform.grid1.column1.text1.value
thisform.release


2. you can use search form grid's recordsource on your first form directly if you are not closing it.



-----------------------------------------------------------------------------------------------
Regards
Surinder Singh
Email: sur200@indiatimes.com
Check my blog for details: http://weblogs.foxite.com/sur200
----------------------------------------------------------------------------------------
*If you understand what you're doing, then you're not learning anything.

ENTIRE THREAD

Grid value to textbox of another form Posted by Geovannie Ariola @ 7/11/2008 10:19:26 AM
RE: Grid value to textbox of another form Posted by surinder singh @ 7/11/2008 10:28:39 AM
RE: Grid value to textbox of another form Posted by Geovannie Ariola @ 7/11/2008 11:46:01 AM
RE: Grid value to textbox of another form Posted by Stefan Wuebbe @ 7/11/2008 12:09:34 PM
RE: Grid value to textbox of another form Posted by surinder singh @ 7/11/2008 12:12:32 PM
RE: Grid value to textbox of another form Posted by Samir Ibrahim @ 7/11/2008 1:27:47 PM
RE: Grid value to textbox of another form Posted by Jun Tangunan @ 7/12/2008 7:10:54 AM
RE: Grid value to textbox of another form Posted by tushar @ 7/12/2008 7:31:44 AM
RE: Grid value to textbox of another form Posted by Stefan Wuebbe @ 7/11/2008 10:40:55 AM
RE: Grid value to textbox of another form Posted by Barbara Peisch @ 7/11/2008 8:55:32 PM
RE: Grid value to textbox of another form Posted by Geovannie Ariola @ 7/13/2008 4:18:46 PM