View Single Post
  #25 (permalink)  
Old June 10th, 2004, 07:21 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Oh, and another thing: You should move the code that adds the ID to inside the loop:

  RS.MoveNext
next
.....

     'And store the mailId or KeyFieldValue in an array

    If len(NewsletterId) > 0 Then
        NewsletterId = NewsletterId & ", "
    end if
    NewsletterId = NewsletterId & RS("NewsletterId")

As you can see, you loop through your entire recordset. After the last record, you try to access the recordset, which is not going to work as it is now EOF.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote