Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No alias found in deleting a record
Message
 
To
18/07/2002 02:49:12
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00679887
Message ID:
00679909
Views:
24
Jang,

The procedure code that you have included is this in the form of in a separate program file. If its separate then maybe you are in the wrong datasession - is the form using a private data session, try explicitly changing to it.

Also I'm not sure if its related but the Delete and Tablerevert are acting on the current table, while the tableupdate is specifying a table.

HTH
Caroline

>Hello,
> I have a form 'Form1' with a pulldown menu 'M_pop.mpr'.
> 4 basic commands (top,next,prev,last) I built
> in the form can control and display the records fine.
>
> One of the entries on the pulldonw menu has a delete
> record function. When I try delete the current record
> in the form, 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.
> Checking the dataenvironment in the form reveals the table
> is included, the property window shows [alias] is exactly
> the name of the table (a free table) used in the form,
> [name] is cursor1, [order] is none. Nothing seems unusual
> to me, where did I do wrong?
>
> My delete record handler is as follows:
>
> *------------------------------------
> PROCEDURE DelRcrd
> 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 shines some light?
Caroline
Previous
Reply
Map
View

Click here to load this message in the networking platform