Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using ODBC to write to a table

Status
Not open for further replies.

Newuser26

Technical User
May 17, 2006
14
GB
Hi,
I am using an OBDC link from one program to write info to an access database, the link is fine - to test this I use the first database to write the info I need, then open up access and look at the table and the correct info is there.
The problem comes when I have the form open and info is written to the table the only way I can get it to refresh is to use a "refresh" button, is there any way I can refresh with out the button ?
I have tried with the timer but I'd perfer if possible to update as soon as info writen to table.
Please help :)
 
short answer...No

The issue is that the information is queried and then the connection is terminated. The only way to refresh is to reconnect. You can set up a timer, but like you said, it's not a good way to do it.
 
Ok thank you, I did think that was going to be the answer, but I was aways told if you don't ask you will never know !!
 
it's bit of a chore to manage but you could have a requery in the after_Update event of every control you want the form to refresh on...

--------------------
Procrastinate Now!
 
The only problem with that Crowley is that what if the user doesn't update a cell for a while. They may be looking at old data. Then when they attempt to modify the data, it may not be there and cause errors or unexpected results. In addition to that you would be do a LOT of queries. The after_Update event tends to fire even if the user just tabs through the field without changing any thing.
 
Thanks for all the help, Crowley16 and macleod1021. The end user will have no way of changing data and records are not deleted. Sorry I didn't explain very well the first time.
The Access database will be storing info produced be the other program. The end user can only view the info stored, if it needs changing they have to see me, and I would change it from the table.
macleod1021 does have a valid point that they would be looking at old data so I might just have a text box say last updated mm:nn:ss and put a timer in for every 2 mins a msgbox pops up with something to say that they are looking at old data.
So unless any other bright ideas, i'm going to put this to bed. Again thanks for the help. No-doubt I'll be back with another question. :) :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top