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!

Refresh VS Requery VS Recalc.

Status
Not open for further replies.

GShen

MIS
Sep 26, 2002
561
US
I use Refresh alot, but while reviewing something in help I came across Requery again and Recalc. What does Requery do differently than Refresh? I just read Requery does not reset the record pointer (a problem I have been fixing on a lot of forms). What is the downside? And also where does Recalc come into play? Is that just when your records from the query are the same but the data has changed?
running Access 2000 / SQL 2000 ADP's.
If anyone can clearify I would appreciate. I don't want to start putting this in all over the place and find out it does not do what REFRESH does.
Thanks,
 
Thanks,
However, I read it an it does not make sense because of what I am doing. I have a screen which basically runs off a timer interval, refreshing every 15 seconds. Any new records updated by another department (changing the status)will appear on this form when I do a refresh. I changed the code temporarily and I am doing a Requery. From what I read I should not be getting the new records, but in living proof, I am getting them. So I am still kind of stuck on this question although my real question I guess is what is the difference between REFRESH AND REQUERY. I have a handle on the Recalc and Repaint verbs. I saw that you can REQUERY a specific control. I am just using the Requery by itself. Does it act like a Refresh when you do it this way?
Thanks for the pointer but still a little confused.
 
From the XP help file:

The Refresh method shows only changes made to records in the current set. Since the Refresh method doesn't actually requery the database, the current set won't include records that have been added or exclude records that have been deleted since the database was last requeried. Nor will it exclude records that no longer satisfy the criteria of the query or filter. To requery the database, use the Requery method. When the record source for a form is requeried, the current set of records will accurately reflect all data in the record source.

HTH,
Eric
 
Luceze

I always thought refresh does requery. As a matter of fact,I know it does. Here is form ACCESS 2000 HELP.

---------------
If you're working in a multiuser environment, you may want to occasionally refresh the data access page's field list to see any new tables or queries or changes to existing tables or queries that others may have added since you began designing the page.
----------------

Back to original question. What is the difference?

Sorry to be a pain, but 1 and 1 is not making 2.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top