Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 6th, 2009, 12:41 AM
Authorized User
 
Join Date: Feb 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default SubForm Refresh Delay Problem

Created one main form contains a SubForm inside. There is two buttons on the main form, indicated by
a) Save button
b) Refresh button

This button will insert data through the insert SQL string into seperate MS Access but under the same server before the data is displayed on the SubForm.

Question:
Why I need to click the Refresh button 2 to 3 times in order to obtain the latest info ? Below is my code

Quote:
Private Sub RefreshSubForm()
DoCmd.Requery ("SubForm_V_QATransaction")
Me.Refresh
Me!SubForm_V_QATransaction.Form.Refresh
Me!SubForm_V_QATransaction.Form.Filter = "StartDate Is Null or EndDate Is Null"
Me!SubForm_V_QATransaction.Form.FilterOn = True
End Sub
Any chance not to allow the few clicks exercise, on the other hand, type in few VBA codes to act as timer for delay purpose like DoEvents for example .

(Tried before the DoEvents method, however, result remain the same)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Subform linking problem JimTate BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3 0 April 22nd, 2008 11:07 AM
Subform problem fatrich Access VBA 6 October 4th, 2007 08:02 PM
Refresh Parent Subform echovue Access 1 October 18th, 2005 09:59 PM
When to Refresh a SubForm ritag Access 4 October 1st, 2004 09:20 AM
Filtering Subform Problem sherr8 Access 4 May 19th, 2004 10:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.