| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| Hi, I have a form which, on Querysave, is emailed out based on certain conditions, e.g: If champion_name_1 > "" Then memo.SendTo = champion_name_1 End If If champion_name_2 > "" Then memo.SendTo = champion_name_2 End If If champion_name_3 > "" Then memo.SendTo = champion_name_3 End If If champion_name_4 > "" Then memo.SendTo = champion_name_4 End If If champion_name_5 > "" Then memo.SendTo = champion_name_5 End If Currently as written each of these statements overwrites the last ..SendTo recipient. I would /like/ this to instead append to a list of recips. Does anyone know what I need to change? Thanks in advance, Jeff |
|
#2
|
| Store the values in an array, then assign the array to memo.SendTo Something like: Dim SendToArray( 1 to 5 ) as string SendToArray( 1 ) = champion_name_1 SendToArray( 2 ) = champion_name_2 SendToArray( 3 ) = champion_name_3 SendToArray( 4 ) = champion_name_4 SendToArray( 5 ) = champion_name_5 memo.SendTo = FullTrim( SendToArray ) ' FullTrim removes the empties Tim Mohrlant - tmohrlant-at-NO_JUNK_MAIL_comcast.net (remove NO_JUNK_MAIL_) news:1122424473.387982.160620-at-g43g2000cwa.googlegr oups.com... > Hi, > > I have a form which, on Querysave, is emailed out based on certain > conditions, e.g: > > If champion_name_1 > "" Then > memo.SendTo = champion_name_1 > End If > If champion_name_2 > "" Then > memo.SendTo = champion_name_2 > End If > If champion_name_3 > "" Then > memo.SendTo = champion_name_3 > End If > If champion_name_4 > "" Then > memo.SendTo = champion_name_4 > End If > If champion_name_5 > "" Then > memo.SendTo = champion_name_5 > End If > > Currently as written each of these statements overwrites the last > .SendTo recipient. I would /like/ this to instead append to a list of > recips. > > Does anyone know what I need to change? > > Thanks in advance, > Jeff > |
![]() |
| Thread Tools | |
| Display Modes | |