the9thdoctor
IS-IT--Management
The following code should generate a recordset, and (to test that the data is actually being picked up) returns the value from the LogNo field in a Message Box.
Set cnConnection = CurrentProject.Connection
Set rsCallsClosed = New ADODB.Recordset
rsCallsClosed.Open ("SELECT * FROM tblCALLHEADER "
Do Until rsCallsClosed.EOF
MsgBox "Call number " & rsCallsClosed!LogNo
rsCallsClosed.MoveNext
Loop
rsCallsClosed.Close
The only problem I can think of is that the tables exist in a seperate database, although the database the code resides in uses Linked Tables to connect to another database. Mick Snowden
Systems Support Engineer
Set cnConnection = CurrentProject.Connection
Set rsCallsClosed = New ADODB.Recordset
rsCallsClosed.Open ("SELECT * FROM tblCALLHEADER "
Do Until rsCallsClosed.EOF
MsgBox "Call number " & rsCallsClosed!LogNo
rsCallsClosed.MoveNext
Loop
rsCallsClosed.Close
The only problem I can think of is that the tables exist in a seperate database, although the database the code resides in uses Linked Tables to connect to another database. Mick Snowden
Systems Support Engineer