Passing a variable from the form back to the calling program 
Author Message
 Passing a variable from the form back to the calling program

Hello Group,

I have created a log on or log in form that takes parameters from the
calling program and makes the connection with the remote SQLServer. How do I
get the value of the connection handle from the form back into a variable in
the program. I am saving the value of the connection handle in
thisfrom.txtConnectionHandle.value.

Thanks
Jim



Mon, 18 Oct 2004 07:53:26 GMT  
 Passing a variable from the form back to the calling program
If you're logon form is modal, you use the from's Unload method to return
the value.

LOCAL nHandle
DO FORM yourlogonform TO nHandle

* yourlogonform Unload
RETURN thisform.txtConnectionHandle.Value

--

Fred
Microsoft Visual FoxPro MVP
Please respond only to the newsgroups so that all may benefit.

Quote:

> Hello Group,

> I have created a log on or log in form that takes parameters from the
> calling program and makes the connection with the remote SQLServer.
> How do I get the value of the connection handle from the form back
> into a variable in the program. I am saving the value of the
> connection handle in thisfrom.txtConnectionHandle.value.

> Thanks
> Jim



Mon, 18 Oct 2004 08:03:06 GMT  
 Passing a variable from the form back to the calling program
Hi Fred

Thanks as usual! How do I make a form modal I know what modal means but
don't see anything in the properties of the form that would allow that.

Thanks
Jim

Quote:
> If you're logon form is modal, you use the from's Unload method to return
> the value.

> LOCAL nHandle
> DO FORM yourlogonform TO nHandle

> * yourlogonform Unload
> RETURN thisform.txtConnectionHandle.Value

> --

> Fred
> Microsoft Visual FoxPro MVP
> Please respond only to the newsgroups so that all may benefit.


> > Hello Group,

> > I have created a log on or log in form that takes parameters from the
> > calling program and makes the connection with the remote SQLServer.
> > How do I get the value of the connection handle from the form back
> > into a variable in the program. I am saving the value of the
> > connection handle in thisfrom.txtConnectionHandle.value.

> > Thanks
> > Jim



Mon, 18 Oct 2004 20:41:49 GMT  
 Passing a variable from the form back to the calling program

Quote:
> Hi Fred

> Thanks as usual! How do I make a form modal I know what modal means but
> don't see anything in the properties of the form that would allow that.

> Thanks
> Jim

Object.WindowType   (0= modeless 1 =modal)

-martin



Mon, 18 Oct 2004 21:41:22 GMT  
 Passing a variable from the form back to the calling program
Whilst you probably do want your login form to be modal, I'd suggest
that that's because you don't want the user going round it, rather
than that's a good way to pass values.

I'd suggest (err, again) it's better to set the (modal) login form to
not visible when you've finished with it and then, because you've got
an object reference to it, pick the values out of it's enry boxes &tc
then discard it (once you've sucked it dry, hahahahaha)(err, sorry,
couldn't resist 8-) )

Mark
-If more of us acted more weirdly,
d'you think people might be more open minded?



Wed, 20 Oct 2004 03:23:13 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. passing arrays back from a form

2. passing arrays back from a form

3. Passing parameters back to a form

4. Modal form not passing back value in Distributed VFP Mac 3.0

5. Passing arrays to forms...AND back

6. Pass parameters to main program when call EXE

7. Passing the value of a variable between programs

8. Can I Pass More Than 1 Form Variable.

9. Passing variables to forms.

10. Passing variables between forms in VFP3 FORMSET

11. passing variable from form to report

 

 
Powered by phpBB® Forum Software