Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Access scrape from reflection

Access scrape from reflection

Access scrape from reflection

Hello, I am scraping data fields from Attachmate Reflection into MS Access with the following VB macro. The macro runs fine, the data is correct and it gives a completion message; however, it is not updating my table with the data. Any ideas why?

I include 'MS DAO 3.6 Object library' in my References


Option Compare Database
Option Explicit

Private Sub Start_Conversion_Click()
On Error GoTo Err_Start_Conversion_Click
On Error GoTo 0
Dim reflection As Object
    Set reflection = GetObject("RIBM")

'** Prepare the database:
   Dim db As DAO.Database
   Dim rs As DAO.Recordset
   Dim i As Integer
   Dim varLineCounter As Long

    TIME_STARTED = Time()

    Set db = CurrentDb
    Set rs = db.OpenRecordset("testdb")
'** Start the main loop:

       With reflection

        .WaitForEvent rcKbdEnabled, "30", "0", 1, 1
         varLineCounter = 1
         Do While varLineCounter < 24
            varLineCounter = varLineCounter + 1
         If IsNumeric(.getdisplaytext(varLineCounter, 116, 4)) Then
'         MsgBox "yes " & varLineCounter & " " & .getdisplaytext(varLineCounter, 34, 35)
            rs!Data0 = .getdisplaytext(varLineCounter, 9, 9)
            rs!data1 = .getdisplaytext(varLineCounter, 23, 9)
            rs!data2 = .getdisplaytext(varLineCounter, 34, 35)
            rs!data3 = .getdisplaytext(varLineCounter, 75, 13)
            rs!data4 = .getdisplaytext(varLineCounter, 95, 13)
         End If
'***** END OF MACRO **************
         On Error Resume Next
        .WaitForEvent rcKbdEnabled, "30", "0", 1, 1
         On Error GoTo 0
    Exit Sub

    MsgBox Err.Description
    Resume Exit_Start_Conversion_Click
End With
End Sub

RE: Access scrape from reflection

You need to add the following after setting all of the recordset fields.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close