S
Steven M. Britton
I am trying to fill an Array with values from a Query. The info is showing
in the locals window, but I get an error saying "Subscript out of range" and
the line loading the array...??? Help?
Option Compare Database
Option Explicit
Public Sub Set_DNet()
Dim db As DAO.database
Dim rs As DAO.Recordset
Dim varDNet() As Variant
Dim i As Long
Set db = CurrentDb()
Set rs = db.OpenRecordset("qryDNet")
With rs
For i = 0 To rs.RecordCount
varDNet(i) = !Epx 'this is where I get the error...
.MoveNext
Next
End With
End Sub
in the locals window, but I get an error saying "Subscript out of range" and
the line loading the array...??? Help?
Option Compare Database
Option Explicit
Public Sub Set_DNet()
Dim db As DAO.database
Dim rs As DAO.Recordset
Dim varDNet() As Variant
Dim i As Long
Set db = CurrentDb()
Set rs = db.OpenRecordset("qryDNet")
With rs
For i = 0 To rs.RecordCount
varDNet(i) = !Epx 'this is where I get the error...
.MoveNext
Next
End With
End Sub