Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Daniel Hofford
  Where is Daniel Hofford?
 Ocala
 Florida - United States
 Daniel Hofford
 To: Barbara Peisch
  Where is Barbara Peisch?
 Oceanside
 California - United States
 Barbara Peisch
 Tags
Subject: RE: Parameters2Forms
Thread ID: 154856 Message ID: 155031 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Saturday, December 22, 2007 2:05:28 AM         
   


> >
> > Hi Barbara,
> > In the init of the grid:
> >
> >
> >
THIS.RECORDSOURCETYPE = 4
> > THIS.RECORDSOURCE ="SELECT wonum,t_in,t_out,wc,route,empid,qtybuilt,opcomp, 000 as minutes FROM timeinput ;
> > WHERE empid = '94' AND EMPTY(t_out) AND TTOD(t_in)=>DATE()-3 INTO CURSOR ttimeinput READWRITE"
> > THISFORM.BindControls =.T.
> > thisform.refresh

> >
> > Dan
> > "Our gold does not chink and glitter. It gleams in the sun and neighs in the dark." Chief Joseph
>
> I thought the whole point of this was that you needed to pass parameters to the form in order to run the query for the grid. If that's the case, you can't set BindControls to .T. in the Grid's Init. You have to do it in or after the form's Init.
>
> -BP
> www.peisch.com

Barbara,
Interesting. I had tried setting the bindcontrols in the init of the form but that's when I discovered that the whole grid was rendered read only. If I set the bind control for the form as .f. and then put thisform.bindcontrol=.t. in either the init of the form or the init of the grid - it makes no difference - I get a read only grid.

So I'm creating the cursor first and then calling the form which works fine - its just not as organized as I'd like it with the form having the code it needs to run.
Dan
"Our gold does not chink and glitter. It gleams in the sun and neighs in the dark." Chief Joseph

ENTIRE THREAD

Parameters2Forms Posted by Daniel Hofford @ 12/20/2007 6:12:11 AM
RE: Parameters2Forms Posted by Vladimir Zhuravlev @ 12/20/2007 7:12:31 AM
RE: Parameters2Forms Posted by Marcia Akins @ 12/20/2007 12:47:05 PM
RE: Parameters2Forms Posted by Daniel Hofford @ 12/20/2007 4:48:45 PM
RE: Parameters2Forms Posted by Daniel Hofford @ 12/20/2007 5:29:00 PM
RE: Parameters2Forms Posted by Daniel Hofford @ 12/20/2007 5:36:59 PM
RE: Parameters2Forms Posted by Barbara Peisch @ 12/21/2007 3:29:49 AM
RE: Parameters2Forms Posted by Daniel Hofford @ 12/21/2007 5:16:48 AM
RE: Parameters2Forms Posted by Barbara Peisch @ 12/21/2007 6:04:32 AM
RE: Parameters2Forms Posted by Daniel Hofford @ 12/22/2007 2:05:28 AM
RE: Parameters2Forms Posted by Marcia Akins @ 12/22/2007 8:19:50 PM
RE: Parameters2Forms Posted by Daniel Hofford @ 12/23/2007 5:10:05 AM
RE: Parameters2Forms Posted by Marcia Akins @ 12/24/2007 12:49:51 PM
RE: Parameters2Forms Posted by Daniel Hofford @ 12/24/2007 4:09:30 PM
RE: Parameters2Forms Posted by Ken Murphy @ 12/20/2007 1:39:13 PM