Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record deletion question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00419306
Message ID:
00419441
Views:
17
I got the thing working bu using the following to delete the record . .

delete from tblbranchadmin where alltrim(tblbranchadmin.branchnumb) = alltrim(thisform.brnumb)

... instead of just 'delete'

>I'm having trouble deleting a record with the following code:
>
>***********************************
>
>*cmdDelete.click
>
>use tblBranch in 0 again alias countbranch
> count to thisform.records
>use in countbranch
>
>select tblbranchadmin
>
>
>if thisform.records = 1
>=messagebox("There must be at least one branch - Branch record will not be deleted !";
> ,64,"SWITCH Reconciliation")
>else
> if messagebox("Are you sure you want to delete this Branch",;
> 256+4+32,"SWITCH Reconciliation") = 6
> delete && RECORD IS NOT BEING MARKED FOR DELETION !!
> go top
> thisform.brname = alltrim(tblbranchadmin.branchname)
> thisform.brnumb = alltrim(tblbranchadmin.branchnumb)
> thisform.refresh()
> endif
>endif
>
>***************************
>
>Are there any system settings that would prohibit the deletion of a record? I'm probably overlooking something very simple but I can't see it.
Al Williams

Anola MB, CANADA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform