Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Blum
  Where is Ken Blum?
 Chicago
 Illinois - United States
 Ken Blum
 To: matiass emanuel
  Where is matiass emanuel?
 la
 Argentina
 matiass emanuel
 Tags
Subject: RE: deleted mark in a checkbox
Thread ID: 33683 Message ID: 33884 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: Forms
Date: Thursday, December 04, 2003 6:35:07 PM         
   


> Hops...
> sorry, but i'm new to foxpro....
> where must I put
> "Thisform.mycheckbox.value = DELETED()" ???
> so that the checkbox represents the deletion mark also if this was set in another way (not by clicking the checkbox).... for example from the IDE...
>
> I tried ti put it into the properties inspector in the value property, but it raises an error about wrong data type...
>
> Thanks again...
>
> > Dear Matiass,
> >
> > You should use to line:
> > SET DELETED OFF
> >
> > In this way, deleted records are still shown. When you walk through the records of the table the command DELETED() returns a .T. when the record is marked as deleted and .F. when it is not deleted.
> >
> > Thisform.mycheckbox.value = DELETED()
> >
> > In the interactive change of the checkbox, you can put the following code:
> >
> > SELECT MyTable
> > IF Thisform.mycheckbox.value
> > DELETE()
> > ELSE
> > RECALL
> > ENDIF
> >
> > I hope this helps
> >
> > Kind regards,
> > Arno Hanssen
> >
> >
> > > Hi!....
> > > I'm trying to put a checkbox in a form, whose value (checked or not) represents the deletion mark of the record..
> > > so... if I check it, then the record must be marked as deleted... if I uncheck it, it must be recall'ed...
> > >
> > > is this possible???
> > > what's the best approach??
> > >
> > > please, helpme...
> > >
> > > thanks a lot!
> > >
2 places - In the forms INIT method, and whatever method you are using that changes the current record in the table.

Or, just put:
THIS.Value=DELETED("MyTableName")
in the Refresh method of the checkbox, and call the refresh method whenever you change the current record in the table.

KTB

ENTIRE THREAD

deleted mark in a checkbox Posted by matiass emanuel @ 12/1/2003 9:36:00 PM
RE: deleted mark in a checkbox Posted by Arno Hanssen @ 12/1/2003 10:21:43 PM
RE: deleted mark in a checkbox Posted by matiass emanuel @ 12/2/2003 4:14:10 AM
RE: deleted mark in a checkbox Posted by matiass emanuel @ 12/2/2003 4:27:46 AM
RE: deleted mark in a checkbox Posted by Ken Blum @ 12/4/2003 6:35:07 PM