refresh form on what event property?

cardgunner

Registered User.
Local time
Today, 06:04
Joined
Aug 8, 2005
Messages
210
I want my form to refresh after the user has selected the record. I have tried the load, current, resize, activate, and open and these don't refresh when I want them to. The on timer works but it's too much.

So soon as he switches from one record to the next I want it to refresh.

Reason for this, and it may not be a good one, is on the form is a listbox and the rowsource of the listbox is bound to a value on the form. So the info in the listbox won't show the right values till i refresh. I don't want the user to have to hit a refresh button.
 
What about the Event "On Change" add the code "me.requery"?

You didnt give us a sample database to work with and test but maybe that or repaint will do what your looking for.
 
I couldn't find an on change. I did try it on view change & on selection change & on data set change. And that didn't refresh.
 
The sample of code that i'm using is
Code:
Private Sub Form_SelectionChange()
Me.Refresh
End Sub
I couldn't find repaint??
 
I want my form to refresh after the user has selected the record. I have tried the load, current, resize, activate, and open and these don't refresh when I want them to. The on timer works but it's too much.

So soon as he switches from one record to the next I want it to refresh.

Reason for this, and it may not be a good one, is on the form is a listbox and the rowsource of the listbox is bound to a value on the form. So the info in the listbox won't show the right values till i refresh. I don't want the user to have to hit a refresh button.

Where are they selecting the record from? A Combo, or List Box?
 
The sample of code that i'm using is
Code:
Private Sub Form_SelectionChange()
Me.Refresh
End Sub
I couldn't find repaint??

Here you go

DoCmd.RepaintObject , "WHATEVER (FORM OR FIELD) YOU WANT TO REPAINT HERE"

Or

me.Repaint
 
Last edited:
They are going from one record to the next. Say he uses the navigation buttons on the bottom of the form. Or he uses the find the find a specific record.
 
I would use buttons it is easier to manipulate and use code... Disable the Navigation on the bottom of the window (I have learned people seem to always get around codeby using thems and it somehow in my databases at least screw with the data they see being accurate.
 
Oh so get get rid if the navigation buttons.
Create my own.
In the code of that button have it refresh.

If I must.

It seems like alot of work for a novice. I'm just trying to make a few $$.
 

Users who are viewing this thread

Back
Top Bottom