Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Paul Culbertson
  Where is Paul Culbertson?
 Katy
 Texas - United States
 Paul Culbertson
 To: Rafael Copquin
  Where is Rafael Copquin?
 buenos aires
 Argentina
 Rafael Copquin
 Tags
Subject: RE: vfp6 return values from form
Thread ID: 201 Message ID: 207 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Thursday, May 17, 2001 9:25:11 AM         
   


> > > I am using a private data session form to show inventory items.
> > >
> > > From a command button, I call another form, modal and private data session, which is used to enter three search criteria.
> > >
> > > The three criteria are stored to three of the secondary form's properties, namely:
> > > thisform.price, thisform.quantity,thisform.department.
> > >
> > > The secondary form is not closed by using release thisform or thisform.release(). When all three values are entered, the hide method is called.
> > >
> > > From the command button I issue the following:
> > >
> > > local kprice,kquantity,kdept
> > >
> > > do form criteria name oCriteria linked
> > >
> > > with oCriteria
> > > kprice = .price
> > > kquantity = .quantity
> > > kdept = .department
> > > .release()
> > > endwith
> > >
> > > However, I get the message "data taype mismatch" and when I check the values of the variables, the above oCriteria has a value of null.
> > >
> > > What exactly is happening here ?
> > >
> > > Thanks in advance.
> > > Rafael Copquin
> >
> > Hi Rafael,
> >
> > How exactly do you close the second form? If you close it with the X-button in the upper right, then the form will be unloaded. To prevent this from happening issue
> >
> > this.hide
> > NODEFAULT
> >
> > in the queryunload of the second form
> >
> > ----------------
> > Hth,
> >
> > Eric den Doop
> > www.foxite.com
>
> Thank you Eric
> But as I said on my second message above, I forgot to mention that I am calling a formset, and not a single form.
> If I call a single form, it works allright. The problem arises when I call a formset
> What is the problem ?
>

Rafael,

You are using a formset? then your properties are properties of the formset right?

I am not familiar with formsets, but to access the formset properties you would use:
with thisformset.ocriteria
kprice = .price
kquantity = .quantity
kdept = .department
.release()
endwith

Personally I don't recommend using formsets as Eric once mentioned before, i agree with him, that formsets are only still in existance for backward compatibility with foxpro 2.x for dos/windows.

Paul Culbertson

Houston, TX


ENTIRE THREAD

vfp6 return values from form Posted by rafael copquin @ 5/17/2001 7:26:03 AM
RE: vfp6 return values from form Posted by Eric den Doop @ 5/17/2001 7:43:22 AM
RE: vfp6 return values from form Posted by Paul Culbertson @ 5/17/2001 8:28:42 AM
RE: vfp6 return values from form Posted by rafael copquin @ 5/17/2001 8:29:06 AM
RE: vfp6 return values from form Posted by Paul Culbertson @ 5/17/2001 9:25:11 AM
RE: vfp6 return values from form Posted by rafael copquin @ 5/17/2001 10:10:22 AM
RE: vfp6 return values from form Posted by rafael copquin @ 5/17/2001 8:23:44 AM