Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

VB6 ADO refresh button click - Help please


  • Please log in to reply

#1
Wyattda

Wyattda

    New Member

  • Member
  • Pip
  • 3 posts
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
  • 0

Advertisements


#2
stu_design

stu_design

    Member

  • Member
  • PipPipPip
  • 217 posts
have u tried just refrshing not requering??
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP