Access VBADiscuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access VBA section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
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)