I have code that will connect to a mainframe host, perform specific keystrokes and maneuver through screens with a given data element (strDE). What I need to do is be able to write the resulting GetScreen data into a table. I'm able to write the given data element used to maneuver through the screens but I cannot seem to write the result of the scrape. It just comes back with a null value when the IS data on the host. Any assistance is greatly appreciated. Probably overlooking the most obvious.
The GetScreen routine has GetScreen = strRetVal.
Private Sub Command1_Click()
Dim dbs As Database, rst As Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tbl1", dbOpenTable)
PutScreen "abc", 10, 10, True
PutScreen "def", 10, 10, True
PutScreen "123", 12, 15, True
PutScreen "551", 16, 19, False
PutScreen strDE, 20, 19, True
PutScreen "X", 19, 20, True
GetScreen 9, 2, 6
With rst
.AddNew
![DataElem] = strDE
![Result] = strRetVal
.Update
End With
rst.Close
End Sub