How to make a recordset = contents of Array? 
Author Message
 How to make a recordset = contents of Array?

Hi,

I have an array that equels the Selected bookmarks of a datagrid(Not sure if
this is right), I then want a recordset to equal that collection. Can
someone help?

Dim i As Integer ' Counter
Dim intCount As Integer
Dim ArrSelBK()

intCount = DGridSearch.SelBookmarks.Count - 1
ReDim ArrSelBK(intCount) ' Declare array to hold bookmarks.
For i = 0 To intCount
   ArrSelBK(i) = DGridSearch.SelBookmarks(i)
Next i

set rs = ArrSelBK()               'I know this is wrong, ???

Any ideas?

Thanks
GV



Tue, 09 Dec 2003 00:44:21 GMT  
 How to make a recordset = contents of Array?
I always do the following to clear out a recordset

rs.close
set rs = nothing

Quote:
>-----Original Message-----
>Hi,

>I have an array that equels the Selected bookmarks of a

datagrid(Not sure if
Quote:
>this is right), I then want a recordset to equal that
collection. Can
>someone help?

>Dim i As Integer ' Counter
>Dim intCount As Integer
>Dim ArrSelBK()

>intCount = DGridSearch.SelBookmarks.Count - 1
>ReDim ArrSelBK(intCount) ' Declare array to hold
bookmarks.
>For i = 0 To intCount
>   ArrSelBK(i) = DGridSearch.SelBookmarks(i)
>Next i

>set rs = ArrSelBK()               'I know this is
wrong, ???

>Any ideas?

>Thanks
>GV

>.



Tue, 09 Dec 2003 01:05:36 GMT  
 How to make a recordset = contents of Array?
Gerry,

Try this:

rs.Filter = ArrSelBK()

--
HTH,
Alexander Shirshov, MCSD


Quote:
> Hi,

> I have an array that equels the Selected bookmarks of a datagrid(Not sure
if
> this is right), I then want a recordset to equal that collection. Can
> someone help?

> Dim i As Integer ' Counter
> Dim intCount As Integer
> Dim ArrSelBK()

> intCount = DGridSearch.SelBookmarks.Count - 1
> ReDim ArrSelBK(intCount) ' Declare array to hold bookmarks.
> For i = 0 To intCount
>    ArrSelBK(i) = DGridSearch.SelBookmarks(i)
> Next i

> set rs = ArrSelBK()               'I know this is wrong, ???

> Any ideas?

> Thanks
> GV



Thu, 11 Dec 2003 14:20:19 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to make a recordset = contents of Array?

2. Correct way for making Array of arrays

3. Correct way for making Array of arrays

4. Making flowcharts from database content

5. Making a page's content editable

6. Creating array out of contents of field

7. Display contents of an array in a form

8. Reading table contents into array

9. Copy array content

10. Print contents of 2 dimension array?

11. Tally Array Contents

12. storing the contents of an array in a field

 

 
Powered by phpBB® Forum Software