access course london - vba coding refresh subform
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

The UK's most regular instructor-led training courses.
Training information: access course london · Courses in microsoft access · Microsoft Office VBA training

resolvedResolved · Low Priority · Version Standard

VBA coding to refresh a subform

Julie has attended:
Access Advanced course
Access VBA course

by - delegate Julie [10 posts] (2007 Aug 16 Thu, 14:44) replyReply

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?

Access VBA 2 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2003 2008 Sep 4 Thu + 5 Fri Southwark 0 FULL    
2003 2008 Oct 20 Mon + 21 Tue Southwark 6 book now £450 £485
2003 2008 Nov 6 Thu + 7 Fri Southwark 6 book now £450 £485
2003 2008 Dec 4 Thu + 5 Fri Southwark 7 book now £345 £399
2003 2009 Jan 8 Thu + 9 Fri Southwark 7 book now £345 £399
2003 2009 Feb 5 Thu + 6 Fri Southwark 8 book now £275 £399
Full Schedule: See all 15 Access VBA course dates.
Bookings currently available until 5th November 2009.

RE: VBA coding to refresh a subform

by - trainer Richard platinum contributer[785 posts] (2007 Oct 15 Mon, 17:16) replyReply

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


Related articles

· Do You Have Trouble Understanding Databases? Consider a One-on-One Access Course
· Quick Microsoft Access Course: Creating an Inventory Control Database in 8 Simple Steps
· 3 Reasons to Switch from Excel to MS Access - You'll be Glad You Did!
· Access VBA Training Adds Power to your Databases
· Want to Become the Office Hero? MS Project Training Could be the Answer

Access tip:

Create a custom Close button on a Form

By default, Forms that you create in Access have a full set of control buttons, that is, a title bar with Minimize, Maximize and Close buttons in the top right-hand corner and a Control Menu in the top left-hand corner.



Sometimes Access needs to follow certain procedures or events as users close a Form (such as automatically opening another Form perhaps). So it is often a good habit to create a custom Close button on a Form for everyone to use, rather than the standard closing cross.



To create a custom Close button:

1) In Form Design View, draw a Command Button onto the Form.

2) Use the Command Button Wizard to select Form Operations under Categories, and Close Form under Actions.

3) Choose Finish.



Access then creates the button and code to close the form for you. You can add any extra code that needs to run as the Form closes to the same Close procedure.



However, the creation of a custom Close button is pointless if the closing X in the top right-hand corner of the Form remains active. To make the closing X inactive, open the Form Properties box then on the Format tab set the Close Button setting to No. This will grey out the closing X leaving it visible, but inactive.



View all Access hints and tips

Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information
AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz