I have an access database. I have a query that I run w/a button on a form in access. How can I have access run a macro in VBA to input some of the data into Attachmate from the query I run. I've seen people do it w/a form, but not a table from a query which is what I have. Here is some of the code I have to put the data into Attachmate, but I'm lost when it comes to dealing w/the table
Code:
Sub Main
Dim Sessions, System As Object, Sess0 As Object
Set System = CreateObject("EXTRA.System")
Set Sessions = System.Sessions
Set Sess0 = System.ActiveSession
Do
Sub Main
Sess0.Screen.Moveto 5,73
Sess0.Screen.Sendkey
'this is where i dont know how get 'the account number from the query/table that was ran, 'and what to do after that.
Loop Until IsNull(Account Number)
End Sub