View Single Post
  #29 (permalink)  
Old June 10th, 2004, 08:59 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

Right, that's what I thought. You need a way to ignore the first comma. There are at least 2 ways to do that.

1. Strip if of, right before you send it.

NewsletterId = Right(NewsletterId, (Len(NewsletterId) -2))

2. Alternatovely, don't add it in the first place. Inside your main loop, add a counter that keeps track of the number of records. If it's zero (the first record), don't add the comma:

If Len(NewsletterId) > 0 And LoopCounter > 0 Then
  NewsletterId = NewsletterId & ", "
End If


Cheers,

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