Forcing a refresh of data linked to SQL

  • Thread starter Thread starter Scott Lyon
  • Start date Start date
S

Scott Lyon

In the application that I'm working on (in Access XP/2002), I currently have
several controls that display data, based upon linked tables (from SQL
Server).

However, there seems to be a problem, in that if I'm (as a user of the
application) viewing one of the forms with that data on it, and the data is
updated on the SQL Server (such as changing a number, or increasing a
displayed counter), that does not appear to refresh until I move off that
form, and come back to it.


Is there a way I can force Access to refresh that data on a regular basis? I
was considering that I could either have a "Refresh" button that the user
could click, or possibly a Timer control that would run a routine every so
often (such as every minute or two). I think the Timer idea would be
optimal. Unfortunately, I do not know what code to put in the refresh
routine to refresh the data.


Can anyone help?


Thanks!
-Scott
 
Hello Scott!

Something like Me.Requery should do fine...

Hope that helps.

--
Daniel :-)

Computing Technologies International - www.computing-tech.com - We
provide solutions...


Scott Lyon said:
In the application that I'm working on (in Access XP/2002), I currently have
several controls that display data, based upon linked tables (from SQL
Server).

However, there seems to be a problem, in that if I'm (as a user of the
application) viewing one of the forms with that data on it, and the data is
updated on the SQL Server (such as changing a number, or increasing a
displayed counter), that does not appear to refresh until I move off that
form, and come back to it.


Is there a way I can force Access to refresh that data on a regular basis? I
was considering that I could either have a "Refresh" button that the user
could click, or possibly a Timer control that would run a routine every so
often (such as every minute or two). I think the Timer idea would be
optimal. Unfortunately, I do not know what code to put in the refresh
routine to refresh the data.


Can anyone help?


Thanks!
-Scott
 
Back
Top