-
VB6 ADO refresh button click - Help please
The app I'm making displays 3 qrys from a database in labels. Since I'm a newb with VB I’ve used 3 ADO controls to connect to my database to pull the 3 different qrys and display the data in my labels. The problem I'm having is with refreshing the displayed data. I'm using a label as my refresh button so that I can have a graphic as the button. When my app is running and I click the refresh button only 1 of the ADO controls are refreshed.
Here is the code for the label/button:
Private Sub lblRefresh_Click()
On Error GoTo UpdateErr
Adodc1.Recordset.Requery
Adodc1.Refresh
Adodc2.Recordset.Requery
Adodc2.Refresh
Adodc3.Recordset.Requery
Adodc3.Refresh
Exit Sub
UpdateErr:
MsgBox Err.Description
End Sub
Only Adodc3 is refreshed when the button is clicked. Can anyone tell me if there is a problem with what I'm doing here?
Also, the qrys the ADO controls are using are from related tables in my Access database. Like qry1 and qry2 divided by each other make qry3. Qry1, qry2 and qry3 are all displayed on the form. Could it be because the qrys use each other to get the result?
Any help would be greatly appreciated.
Thanks,
Wyatt
-
I think you should install latest service pack.
-
I've already updated to SP6.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks