General information
Category:
Menus & Menu designer
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only