Remove list box item without requery (Access 2000)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have searched the knowledgebase and this forum and can't find an answer to
this. Is there a way to remove a list box item (a record that is displayed)
without requerying? For example, I have a list of records showing in the
list box; the app allows a user to higlight one or more records in the list
and then click on a command button which deletes the records in the database
(SQL Server 2000). Requerying the list takes quite a long time, so I would
like the application to simply remove the records from the list if no error
was returned by the database after the deletes.

The list box is unbound and is populated using a "call-back" function as
described in the Access 2000 handbook and in the MS KB. Not sure that this
matters, but thought I should mention it.

Thanks for the help!
 
Hi,

Thanks for your post.

From your descriptions, I understood you would like to delete selected
record in list box control withour requery it. Have I understood you?
Correct me if I was wrong.

Unfortuantely, I am afraid requery is inevitable, it must take a long time
to requery the updated list. In KB Article:132026, we could find the
descriptions like this

This technique is not useful for large lists (more than 1000 items),
because it would take too long to requery the list.

Thank you for your patience and corperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!


Sincerely yours,

Mingqing Cheng

Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
 
Mingqing,

Thank you for your reply. Yes, I found that KB article too and was hoping
that there was some other way to do this sort of thing.

Jim D.
 
If the table your listbox is based on is appropriately indexed, this can
speed up the requery considerably.
 
Back
Top