Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.
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.