<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4923.2500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=962124711-01082003><FONT face=Arial color=#0000ff
size=2>Pedro,</FONT></SPAN></DIV>
<DIV><SPAN class=962124711-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=962124711-01082003><FONT face=Arial color=#0000ff size=2>Don't
be afraid to ask...</FONT></SPAN></DIV>
<DIV><SPAN class=962124711-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=962124711-01082003>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=962124711-01082003>Dim
intCheckBox as integer</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=962124711-01082003>Dim
intField as integer</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=962124711-01082003>Dim
bolVisible as Boolean</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=962124711-01082003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=962124711-01082003>For
intCheckBox = 1 to 10 ' Change 10 to the number of Product Code Check Boxes on
your form</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=962124711-01082003> bolVisible = Me("chbProductcode"
& intCheckBox)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=962124711-01082003> For intField = 1 to
26</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=962124711-01082003> Me("fields "
& intCheckBox & "_" & intField).Visible =
bolVisible</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=962124711-01082003></SPAN></FONT><FONT face=Arial color=#0000ff
size=2><SPAN class=962124711-01082003> Next
intField</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=962124711-01082003>Next
intCheckBox</SPAN></FONT></DIV></SPAN></DIV>
<DIV><SPAN class=962124711-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=962124711-01082003><FONT face=Arial color=#0000ff
size=2>Scott</FONT></SPAN></DIV>
<DIV><SPAN class=962124711-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=962124711-01082003></SPAN><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Pedro Janssen
[mailto:pedro@plex.nl]<BR><B>Sent:</B> Thursday, July 31, 2003 5:16
PM<BR><B>To:</B> Access Developers discussion and problem
solving<BR><B>Subject:</B> Re: [AccessD] select more then
one<BR><BR></DIV></FONT>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT face=Arial size=2>Hello Scott an the rest of the group</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>i have one more question, if you don't mind. Its
not that i didn't wanted to give you the whole picture, i wanted to solve this
problem myself in the code you suggested (for learning reasons), but i didn't
solve it. It was to difficult for me.</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I would like that:</FONT></DIV>
<DIV><FONT face=Arial size=2>when chbProductcode1 = true, fields 1_1 until
fields 1_26 are visible, when chbProductcode1 = false, fields 1_1 until fields
1_26 are not visible. </FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2>when chbProductcode2 =
true, fields 2_1 until fields 2_26 are visible, when chbProductcode2 = false,
fields 2_1 until fields 2_26 are not visible.</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2><FONT face=Arial
size=2>when chbProductcode3 = true, fields 3_1 until fields 3_26 are visible,
when chbProductcode3 = false, fields 3_1 until fields 3_26 are not
visible</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>etc for 4 and 5</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>TIA</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Pedro Janssen</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=scott.marcus@ae.ge.com href="mailto:scott.marcus@ae.ge.com">Marcus,
Scott (GEAE, Contractor)</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=accessd@databaseadvisors.com
href="mailto: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 face=Arial color=#0000ff
size=2>Pedro,</FONT></SPAN></DIV>
<DIV><SPAN class=183400112-28072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=183400112-28072003><FONT face=Arial color=#0000ff 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 face=Arial color=#0000ff 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 face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=183400112-28072003><FONT face=Arial color=#0000ff
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 face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=183400112-28072003><FONT face=Arial color=#0000ff
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 face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=183400112-28072003><FONT face=Arial color=#0000ff size=2>If
bolFound = True Then<BR> strNumbers = Left(strNumbers,
Len(strNumbers) - 1)<BR>End If</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=183400112-28072003><FONT face=Arial color=#0000ff
size=2>While bolFound = True<BR> intLoc =
InStr(strNumbers, ";")<BR></FONT></SPAN></DIV>
<DIV><SPAN class=183400112-28072003><FONT face=Arial color=#0000ff
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 face=Arial color=#0000ff
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 face=Arial color=#0000ff
size=2> strNumber =
strNumbers<BR> bolFound =
False<BR> End If<BR></DIV></FONT></SPAN>
<DIV><SPAN class=183400112-28072003><FONT face=Arial color=#0000ff
size=2> .Item("ProductCode" & strNumber).Value =
Nz(Me("txtProductCode" & _<BR>
strNumber))<BR> .Item("Number" & strNumber).Value =
Nz(Me![txtNumber])</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=183400112-28072003><FONT face=Arial color=#0000ff
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
face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=183400112-28072003><FONT face=Arial color=#0000ff
size=2>Scott</FONT></SPAN></DIV>
<DIV><SPAN class=183400112-28072003><FONT face=Arial color=#0000ff
size=2> </DIV></FONT></SPAN>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><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 face=Arial color=#0000ff 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 face=Arial color=#0000ff 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 face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>TIA</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Pedro Janssen</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff 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></BLOCKQUOTE></BODY></HTML>