Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.
Sub t639() Dim rs As DAO.Recordset Dim var As Variant Dim oneRec As Collection Dim allRecs As New Collection sql = "select * from tblmain where maccttype in ('Direct') and mname like 's*'" Set rs = CurrentDb.OpenRecordset(sql) i = 0 Do Until rs.EOF i = i + 1 Debug.Print rs!mname If i = 5 Or i = 6 Then Set oneRec = New Collection For Each var In rs.Fields oneRec.Add var.value, var.name Next allRecs.Add oneRec End If rs.MoveNext Loop For Each var In allRecs MsgBox var("mname") Next End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.