Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

access course london - vba coding refresh subform

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » access course london - VBA coding to refresh a subform

access course london - VBA coding to refresh a subform

ResolvedVersion Standard

Julie has attended:
Access Advanced course
Access VBA course

VBA coding to refresh a subform

I have a form with an attached subform (which is in datasheet view). I need the subform to refresh automatically when the focus shifts back to the main form. The only way i have found to do this so far is to close and reopen the whole form which is a bit jerky for the user.

Is there any command that can do this?

RE: VBA coding to refresh a subform

Try adding the following code to an event procedure on the GOTFOCUS Event of the entire form.

Private Sub FormName_GotFocus()
Me.Refresh
End Sub

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Access tip:

Switchboard Startup

An option when you open your Access database that contains all of you tables, forms and queries is only the switchboard is displayed.

To achieve this, select Tools click on Startup. On the right hand side of the Startup screen you are able to select which form you want to open when you open you Access Database. Once you have selected this, there is a check box just below that says "Display Database Window", you need to uncheck this option. Then click ok.

Then when you close you Access database and re open it, the database should open with just the switchboard being shown


View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.