VB6 ADO refresh button click - Help please


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: VB6 ADO refresh button click - Help please

  1. #1
    Join Date
    May 2005
    Posts
    3

    Exclamation 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

  2. #2
    Join Date
    Dec 2004
    Posts
    717
    I think you should install latest service pack.
    Best Regards,
    Michael Sync
    http://michaelsync.net

    The more you share,The more you get

  3. #3
    Join Date
    May 2005
    Posts
    3

    Arrow

    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center