Information générale
Catégorie:
Gestionnaire de menu & Menus
Hello,
I have a form 'Form1' with a pulldown menu 'M_pop.mpr'.
One of the entries on the menu has a delete record
function. The commandgroup having the 4 basic commands
(top,next,prev,last) in the form can control and display
the records fine. When I try deleting the current record
with the delete command in the menu, it always says
"No alias found", which means no table is selected (my guess),
and pops out a window for me to select a table.
Where did I do wrong?
Checking the dataenvironment in the form reveals
the table is included, the property window shows
[alias] is exactly the name of the table used in
the form, [name] is cursor1, [order] is none.
Everything seems fine.
My delete record handler (resided in M_pop.mpr and
saved as a procedure) is as follows:
*------------------------------------
IF MessageBox(" Sure to delete this record ?",4+48," Delete
Record") = 6
DELETE
result = TABLEUPDATE(.F.,.T.,"TagList")
IF result
IF NOT BOF()
SKIP -1
ENDIF
_VFP.ActiveForm.Refresh
ELSE
?? CHR(7)
= MessageBox("Deletion Unsuccessful",48," Delete Record")
= TABLEREVERT(.F.)
ENDIF
ENDIF
RETURN
*----------------------------
Could someone show me where I did wrong, and how I
can rectify it?
Cal
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement