Reload/Refresh form using LostFocus

  • Thread starter Thread starter RitchieJHicks
  • Start date Start date
R

RitchieJHicks

I need to have an on lost focus command which when triggered, refreshes my
entire form.

I have tried

Private Sub DoNotesCommand_LostFocus()
Me.Refresh
End Sub

Bit it doesn't seem to effect anything.

I am doing this to refresh one of my fields after the data from it is placed
in a different field.
 
Hi Ritchie,

I believe if you change data from one field to another when you click Add
Record it will save it. However, you can place a button on the form called
Requery and code it on click Me.Requery. That may also work in your Lost
focus instead of Me.Refresh but I am not sure.

Hope this helps!
 
I need to have an on lost focus command which when triggered, refreshes my
entire form.

I have tried

Private Sub DoNotesCommand_LostFocus()
Me.Refresh
End Sub

Bit it doesn't seem to effect anything.

I am doing this to refresh one of my fields after the data from it is placed
in a different field.

Use the AfterUpdate event instead. LostFocus is too "hair trigger" - it fires
even if you're just tabbing through the control not changing anything. The
Repaint action might be more what you're looking for, though.
 
Back
Top