Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Please help trying to delete an item from list box
Message
 
 
To
09/05/2002 14:23:21
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00654221
Message ID:
00655068
Views:
36
Hello Dragan, i am really sorry. It is not deleting the list item from list box please help.

because in the database table there is a record which matches the criteria but it is not really deleting.

for the list box property Row source has the following in it:
workpkgtask_view.project_no,workpkg_no,task_num,task_desc

how can i trim all the values whichever appears in the list box.before i click delete.

because all the values are coming from the view so the value actually in the view is "112 " with space but in the select query which is used for delete in it the values appearing"112" with no space so i assume that is the reason why it is not deleting.

**********Following is the code i am using*************
THISFORM.mousepointer = 11
local cListTable
cListTable = "WorkpkgTask_View"
select (cListTable)

lCount = thisform.list1.listCount
WAIT WINDOW "Scanning for records to delete" NOWAIT NOCLEAR

FOR cnt = 1 TO lCount
IF INKEY() = 27
EXIT
ENDIF
IF thisform.list1.selectedId(cnt)
thisform.list1.selectedId(cnt) = .f.
SELECT (cListTable)
LOCATE FOR project_no = thisform.list1.listItem(cnt,1) AND Workpkg_no = thisform.list1.listItem(cnt,2)
DELETE
ENDIF
ENDFOR
WAIT CLEAR

thisform.list1.requery
thisform.list1.refresh

thisform.list1.setfocus
thisform.mousepointer = 0

*************************END*****************

Thank you Very much.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform