Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: len cockram
  Where is len cockram?
 len cockram
 To: Michael Gill
  Where is Michael Gill?
 Illinois - United States
 Michael Gill
Subject: RE: problem
Thread ID: 22191 Message ID: 22298 # Views: 0 # Ratings: 0
Version: Visual FoxPro 7 Category: Forms
Date: Tuesday, April 15, 2003 5:24:12 AM         

> > Dear sirs
> >
> > Have a form on which i want to put various controls On first entry want all controls disabled but data visible Control then passes to an overlay form which checks whether fresh input is appropriate or not If amendment is required then all controls are enabled otherwise both forms clear At this stage cannot get the form to re-enable for some reason Have put this up to you before but it still does not work
> >
> > Also have a problem on lostfocus
> >
> > Any help is appreciated
> >
> >
> > procedure init
> >    if(query="N") &&query is outside public variable
> >       this.enabled=false
> >       do yesnoobj with "Amend?",query &&overlay which checks for new input
> >       if(query="N")
> >          clear events
> >       else
> >          this.refresh &&recalls the control and should enable it
> >       endif
> >    endif
> > endproc
> > procedure lostfocus &&this procedure fails to identify query and fails
> >    do yesnoobj with "Amend?",query
> >    etc
> > endproc
> > 

> >
> > Couple of thoughts does this.refresh reinitialise the control? Because lostfocus is one of the latter events does this cause the problem with my variable
> >
> > Regards len cockram
> I don't follow exactly what you're trying to do, but a REFRESH doesn't re-enable your controls. You have to set this.Enabled = .T.
> ---
> www.foxite.com - The Home of the Visual FoxPro Experts
Dear michael

Thank you for your response

What i want to do is create a form for input or amendment of data When this form is first opened the form is not enabled and a call to yesnoobj(which is another form) is made to check whether input or amendment is required If input or amendment is required then the form is enabled and data is input Once data input/amendment is complete then yesnoobj is called again i.e. on lostfocus I know i am close to making it work but it keeps eluding me

Have already included this.enabled=true thanks

Regards len cockram


problem Posted by len cockram @ 4/11/2003 10:34:14 AM
RE: problem Posted by Michael Gill @ 4/14/2003 4:30:34 PM
RE: problem Posted by len cockram @ 4/15/2003 5:24:12 AM