Refresh data (some Calcs) when scolling thru records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Some of the data in the query tied to a form is used to hide or unhide text
boxes or modify other controls like background color. I can refresh the
record to show the changes with a refresh button ot on mouse move but would
like for the changes to show as I enter a different existing record using the
navigation buttons at the bottom of the page. Is there a 'on enter next
record' kind of spot that I can add the assorted vba commands that alter the
field info?
 
This kind of code needs to go in Private Sub Form_Current().

Private Sub Form_Current()
If This = That Then
TheOther.Visible = False
End If
End Sub

If you need to have something occur *only* if it's a new record, or *only* if
it's an existing record

Private Sub Form_Current()
If Me.NewRecord Then
'New record stuff here
else
'Existing record stuff here
End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top