I have have a problem in
VB within my database. I am trying to move through recordsets and print the value of different fields (at this point, just to a message box). I can only get the values of 1 field only . Usually the index or first field of any recodrset. I was using Access 2000 and recently loaded 2003 in an attempt to overcome the problem.
Here is the code
Private Sub Command71_Click()
Dim dbs As DAO.Database
Dim rsTable As DAO.Recordset
Dim booNext As Boolean
Dim intcount As Integer
Dim intLast As Integer
Set dbs = CurrentDb
'Open the table-type recordset
Set rsTable = dbs.OpenRecordset("Table1")
'First message
MsgBox "please wait while the processing is completed"
'Get the number of records
With rsTable
.MoveFirst
.MoveLast
intLast = .RecordCount
.MoveFirst
End With
'Cylce through the recordset
For intLast = 0 To (intLast - 1)
With rsTable
Debug.Print , !field1, !field2
MsgBox "the field values are for field 1 " & !field1 & " for field 2 " & !filed5
.MoveNext
End With
Next
End Sub
Any ideas would be appreciated
Gary.