Originally posted by Dubya007
i have an error in this from clause, i'm not really sure why it is. but here is the code.
VB Code:
'****************************************************
'the form loads with a connection the Test Query in
'access
Private Sub Form_Load()
If sgrs.State = adStateClosed Then
Debug.Print "sgrs is closed"
sgrs.Open "SELECT * FROM Test", DBConn, adOpenDynamic, adLockOptimistic[color=red], adCmdText[/color]
Call Display(0)
sgrs.MoveFirst
Else
Debug.Print "Sgrs is open"
Call Display(0)
End If
If Trs.State = adStateClosed Then
Debug.Print "trs is closed"
Trs.Open "SELECT * FROM Check", DBConn, adOpenDynamic, adLockOptimistic[color=red], adCmdText[/color]
End If
End Sub
Trs and sgrs are both declared in the heading as global variables. i need to access both of the tables in order to get info from both of them. the tables are in Access97