Converting from '97 to '02, listbox.requery issue

A

Acie

I have a '97 application that i'm trying to convert to '02
version.

Anyway, the '97 Application runs perfectly. When I
converted it, I have an issue with the requery of a listbox
control. I get no errors.

Basically I display a listbox with names. Then after the
user selects a name on the listbox, and clicks on the
button. The process then is to use DAO to delete that
particular name from the underlying table via an sql stmt.
Then I do a listbox.requery command. This should cause the
bounded listbox to re-read the new list of names and diplay
them on the listbox. (essentially removing the name
selected by the user). Well, it doesn't do that.(althought
the name no longer exists in the table! However, if I
select another name, and click on the button, then it
updates the listbox and removes both the first and the send
name ! And it works from then on... strangely..

Any ideas??? - Is this a MS bug?

I've tried the:

1) listbox.requery and
2) Docmd.requery listbox

both do the same thing..

Thanks,

Acie
 
D

david epsom dot com dot au

Try using the RowCount value. It reloads the data
to count the number of records, rather than using
a cached value.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top