List Boxes And ADO

C

Clarkester

I have a list box that displays data from a linked table.
When I update or append data to the table using ADO, then requery the list
box it does not show up on the list box.
I have tested using a button that requeries the list box. When I updat or
add a record then hit the button 2-4 times the list box eventually shows the
data.
It seems like the list box requery is happening asyncronously as the ADO
edit is occuring.
I know using a SQL insert or update works using docmd.runsql but I really
would rather do it with ADO. The code is more readable and I have to use ADO
to retrieve the row data anyway(this is an unbound form).
 
B

Brendan Reynolds

Clarkester said:
I have a list box that displays data from a linked table.
When I update or append data to the table using ADO, then requery the list
box it does not show up on the list box.
I have tested using a button that requeries the list box. When I updat or
add a record then hit the button 2-4 times the list box eventually shows
the
data.
It seems like the list box requery is happening asyncronously as the ADO
edit is occuring.
I know using a SQL insert or update works using docmd.runsql but I really
would rather do it with ADO. The code is more readable and I have to use
ADO
to retrieve the row data anyway(this is an unbound form).


Previous discussions in the newsgroups seem to indicate that explicitly
closing the ADO Connection object can help with this kind of caching/timing
issue.

If you're using an Access front-end and a JET database, there's always the
option of using DAO instead.
 

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