Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do you want to delete this record?
Message
 
To
06/12/2000 11:39:21
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00449988
Message ID:
00450211
Views:
21
Hi Chuck -

Technically, yes. Your code is going to delete the record in whatever table you are currrently sitting on... This is going to be very confusing for the user I think.

There are many ways to handle this...
How about having the Delete of the form (either by a command button or toolbar) delete the parent and Right Clicking on an item in the grid to bring up a popup menu that allows them to delete (or add) a child record from the grid? Additionally, you could add hotkeys to also do this from the keyboard.

If they delete a parent record you might want to use the RI (Referential Integrity) if your data is stored in a VFP database.

>VFP 6.0
>
>In Delete button (Click Event) of the form with parent(main form)/child(grid) relationship
>
>nAnswer = MessageBox('Do you want to delete this record?',4)
>IF nAnswer = 6
> DELETE
> SKIP -1
> IF BOF()
> LOCATE
> ELSE
> SKIP
> IF EOF()
> SKIP -1
> ENDIF
> ENDIF
>ENDIF
>ThisForm.REFRESH
>
>This is what I have so far. I like to ask how to design this in regards if wanting to delete the parent record or the child record? Does this go by where the cursor is? I was wondering if, in general, this go about like this... 'Do you want to delete the person or the authorization?' (where the 'person' is parent and the 'authorization' is in the grid). Or it still need to be based on where the cursor is?
ellen whitney
EPS Software Corp
Previous
Reply
Map
View

Click here to load this message in the networking platform