Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 15th, 2005, 03:48 AM
Registered User
 
Join Date: Jun 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Autorefresh

Ok, This one may be a simple fix by my brain hurts from coding and I cant figure it out.
Is there a way to ad a autoresh fucntion to a form. I have a refresh key but I hate having to press it every time I add information to a form/table.

Thanks again

Mike


 
Old June 15th, 2005, 08:29 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

For what it is worth, I would think that you have at least two options. Rather than a refresh key, you could add an event to any applicable control that would refresh the form after it has been updated or lost focus. The second is klunky a probably a bad idea, but you could add a time and set a refresh every 10 seconds, but this takes more resources I would think, and could wipe out fields if you are in the midst of entering them.

Mike

Mike
EchoVue.com
 
Old June 18th, 2005, 10:34 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 248
Thanks: 0
Thanked 1 Time in 1 Post
Default

It seems odd that you have to refresh. Most of the time Access handles the refresh for you. But then you've indicated that you're adding to a "form/table", which could mean you're switching between forms/table views and adding records by multiple methods.

At any rate, some events to consider putting in a Me.Requery or Me.Refresh: Form_Activate, After_Insert and After_Update.

Tricky thing about putting those in, if the user switches between forms or your application opens other forms during data entry, the Requery/Refresh will kick off the Save Record and the OnCurrent event, among others. Your results may be even more annoying than having to click the Refresh button.

BTW, are you refreshing all of data displayed on the form (i.e. the record source for the form)? Or are you trying to refresh the information in a dropdown where you've just added a new value to the lookup table for that dropdown? If the latter, just use the GotFocus event of the dropdown field and requery only that field.

Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group
http://www.pnwadg.org





Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic upload / autorefresh settings. danielh Dreamweaver (all versions) 3 March 22nd, 2004 04:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.