<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello Scott,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>i didn't had the intention to give each time new
information.</FONT></DIV>
<DIV><FONT face=Arial size=2>I was helping a friend of mine with a mail merge,
and i thought he wanted only one selection. But when i showed him the mail
merge, he said that he needed to select more then one productcode. Sorry that i
didn't know that the last time i asked for help.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thanks for helping me (and my friend)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Pedro</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A href="mailto:scott.marcus@ae.ge.com" title=scott.marcus@ae.ge.com>Marcus,
Scott (GEAE, Contractor)</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
href="mailto:accessd@databaseadvisors.com"
title=accessd@databaseadvisors.com>'Access Developers discussion and problem
solving'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, July 28, 2003 2:10 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [AccessD] select more then
one</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial
size=2>Pedro,</FONT></SPAN></DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial size=2>We
should really know the whole picture so that the code doesn't need to be
rewritten each time you give us a new piece of information. Anyway, t<SPAN
class=183400112-28072003><FONT color=#0000ff face=Arial size=2>his should get
you there (with some minor tweaks). </FONT></SPAN>Watch out for line wrapping
in the e-mail...</FONT></SPAN></DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial size=2>Dim
strNumbers As String, strNumber As String<BR>Dim intLoc As Integer, intNumber
As Integer<BR>Dim bolFound As Boolean</FONT></SPAN></DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial
size=2>bolFound = False<BR>For intNumber = 1 To 5 ' Build a string
that represents each checked Product Code<BR> If
Me("chbProductCode" & intNumber) = True
Then<BR> strNumbers = strNumbers
& intNumber & ";"<BR>
bolFound = True<BR> End If<BR>Next
intNumber</FONT></SPAN></DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial size=2>If
bolFound = True Then<BR> strNumbers = Left(strNumbers,
Len(strNumbers) - 1)<BR>End If</FONT></SPAN></DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial
size=2>While bolFound = True<BR> intLoc = InStr(strNumbers,
";")<BR></FONT></SPAN></DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial
size=2> If intLoc > 0 Then ' see if the are more than one
to deal with<BR> ' There are more
than one so, parse out individual numbers</FONT></SPAN></DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial
size=2> strNumber = Left(strNumbers,
intLoc - 1)<BR> strNumbers =
Right(strNumbers, Len(strNumbers) - intLoc)<BR>
Else<BR> ' This is the last
one</FONT></SPAN></DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial
size=2> strNumber =
strNumbers<BR> bolFound =
False<BR> End If<BR></DIV></FONT></SPAN>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial
size=2> .Item("ProductCode" & strNumber).Value =
Nz(Me("txtProductCode" & _<BR>
strNumber))<BR> .Item("Number" & strNumber).Value =
Nz(Me![txtNumber])</FONT></SPAN></DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial
size=2> 'You need to change this for what you are
doing<BR> If chbA1 = True
Then<BR> .Item("Price" &
strNumber).Value = Nz(Me("txt" &
_<BR>
strNumber & "c16"))<BR> ElseIf chbA2 = True
Then<BR> .Item("Price" &
strNumber).Value = Nz(Me("txt" &
_<BR>
strNumber & "c17"))<BR> ElseIf chbA3 = True
Then<BR> .Item("Price" &
strNumber).Value = Nz(Me("txt" &
_<BR>
strNumber & "c18"))<BR> ElseIf chbUitz1 = True
Then<BR> .Item("Number" &
strNumber).Value = Nz(Me("txtUitz" &
_<BR>
strNumber & "Number"))<BR>
.Item("Price" & strNumber).Value = Nz(Me("txtUitz" &
_<BR>
strNumber & "Price"))<BR> End
If<BR>Wend<BR></FONT></SPAN></DIV>
<DIV><SPAN class=183400112-28072003></SPAN><SPAN
class=183400112-28072003></SPAN><SPAN class=183400112-28072003><FONT
color=#0000ff face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial
size=2>Scott</FONT></SPAN></DIV>
<DIV><SPAN class=183400112-28072003><FONT color=#0000ff face=Arial
size=2> </DIV></FONT></SPAN>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Pedro Janssen
[mailto:pedro@plex.nl]<BR><B>Sent:</B> Saturday, July 26, 2003 10:22
AM<BR><B>To:</B> AccessD@databaseadvisors.com<BR><B>Subject:</B> [AccessD]
select more then one<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hello Group,</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>with the code below i get as result: One
Produktcode, One number and One price depending on which
checkboxProduktcode is selected.</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is there a way to change this code so that i
could select more then one checkboxProduktcode (still only one of the chbA1,
chbA2, chbA3 or chbUitz1can be selected) and that the outcome would be the
selected produktcodes with there numbers and prices</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>TIA</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Pedro Janssen</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Dim strNumber as String<BR>Dim bolFound as
Boolean<BR><BR>bolFound = False<BR>If chbProductCode1 = true
then<BR> strNumber = "1"<BR> bolFound =
True<BR>ElseIf chbProductCode2 = true then<BR> strNumber =
"2"<BR> bolFound = True</FONT></DIV>
<DIV><FONT face=Arial size=2>ElseIf chbProductCode3 = true
then<BR> strNumber = "3"<BR> bolFound =
True<BR>ElseIf chbProductCode4 = true then<BR> strNumber =
"4"<BR> bolFound = True<BR>ElseIf chbProductCode5 = true
then<BR> strNumber = "5"<BR> bolFound =
True<BR><BR>EndIf<BR><BR>If bolFound = True then<BR>
.Item("ProductCode" & strNumber).Value = Nz(Me("txtProductCode" &
_<BR>
strNumber))<BR> .Item("Number" & strNumber).Value =
Nz(Me![txtNumber])<BR> <BR> If chbA1 =
True then<BR> .Item("Price" &
strNumber).Value = Nz(Me("txt" &
_<BR>
strNumber & "c16"))<BR> ElseIf chbA2 = True
then<BR> .Item("Price" &
strNumber).Value = Nz(Me("txt" &
_<BR>
strNumber & "c17"))<BR> ElseIf chbA3 = True
then<BR> .Item("Price" &
strNumber).Value = Nz(Me("txt" &
_<BR>
strNumber & "c18"))<BR> ElseIf chbUitz1 = True
then<BR> .Item("Number" &
strNumber).Value = Nz(Me("txtUitz" &
_<BR>
strNumber & "Number"))<BR>
.Item("Price" & strNumber).Value = Nz(Me("txtUitz" &
_<BR>
strNumber & "Price"))<BR> End If<BR>End
If<BR></DIV></BLOCKQUOTE></FONT>
<P>
<HR>
<P></P>_______________________________________________<BR>AccessD mailing
list<BR>AccessD@databaseadvisors.com<BR>http://databaseadvisors.com/mailman/listinfo/accessd<BR>Website:
http://www.databaseadvisors.com<BR></BLOCKQUOTE></BODY></HTML>