I'm having an issue with an error I am getting with the following code
in Access 2002.
Sub AddCategories()
Dim rst As DAO.Recordset
Dim i As Integer
Set rst = CurrentDb.OpenRecordset("SortCat")
rst.AddNew
Do While strCat(i) <"" **** error occurs here
rst.AddNew
rst!Sort_Cat = strCat(i)
rst.Update
i = i + 1
Loop
The strCat is an array that is defined publicly and filled from a
function that calls this one. I get a "subscript out of range" error
once the array is empty. It is a dynamic array due to it taking
information from a split string with a random number of items
(categories from outlook). I've tried many ways to break out of the
loop. What test can I do to be able to break out of the loop and go
back to the previous function?
Thanks
O