Discussion Locked

Code for refreshing in Access 2000?

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Does anyone know how to write code or a macro for refreshing a form? I tried requery and repaint. It didn't work. Is there any other way to do it besides SetKeys? If not what is the set keys for form refreshing? ALT + R + H... How do you write this in a macro? Thanks for all your help!
Joshua Miller
Riverside Computing, Inc.

3 replies

by bob sellman

Either requery or recalc should do the job. Perhaps you aren't requesting it at the right time, such as the after update property for a value that is changing. The line of code would either be
me.recalc
or
me.requery

As an example, say you have a form with an "extra" control in the footer where the user can enter a new reference number and the form is based on a query that includes the condition that the reference number equals the value in the user entered control (which is not tied to any field in the table).

You would add to the code for the property after update of the control the following line:
me.recalc (or me.requery)

Then, when the user enters a new reference number and presses enter or tab, the records that match the new reference number will be displayed.

This discussion is closed to new replies.