Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
2 list boxes
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00054247
Message ID:
00054551
Views:
35
>>>I have two list boxes on screen, One is populated with a remote view of serial numbers available,
>>>the other is populated with serial numbers assigned to a user. What I can't find how to do is to
>>>delete a record from the view (and thus the table) when it is moved from one list box to the other.
>>>The item must reside in one list box or the other, this makes it so the serial number resides in either
>>>the available or the assigned table. Can any one help with this? Guess I need to know how to remove a
>>>selected item from a list and its associated view (Updating that views table in the meantime).
>>>
>>>Thanks
>>>
>>>Gary
>>
>>Gary, specific steps will depend on the RowSourceType of the list boxes. However, I would update the view programmatically (as part of the code you use to move the item) then re-query & refresh both lists to remove the serial number from the first and add it to the second.
>>
>>The code would be part of the button, double-click or other method you are using to move an item.
>>
>>If you have used AddItem() to build the lists you can delete the item with RemoveItem and put it in the second list with AddItem, but you will still have to update the view. If the lists are based directly on the view(s) then update the view first and use requery.
>>
>>HTH
>>Barbara
>
>Thanks Barbara,
>
>Thats exactly what I ended up doing, The only problem I'm having now is that I refresh both
>views but I keep getting errors that the server is busy. Need to figure out how to wait until
>one query is done before starting another.
>
>Gary

Gary, you can either add a loop that retries n times when it gets the server busy error or you can put a wait of 0.1 seconds or similar between the updates.

Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform