i have an error in this from clause, i'm not really sure why it is. but here is the code.
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 Access97VB 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 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 End If End Sub




Reply With Quote