<!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 6.00.2800.1141" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff size=2>How
about something like this:</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2><code></FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2>Function ShowHide(ctl as Control)</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff size=2>Dim
inner As Integer</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff size=2>Dim
outer as Integer</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff size=2>Dim
ShowIndex As Integer</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2>ShowIndex = Right(ctl.Name, 1)</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2>For outer = 1 To 5</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff size=2>
For i = 1 To 26</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2> If outer = Cint(ShowIndex)
Then</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2> Controls("Field" & ShowIndex & "_" & CStr(i)).Visible = True</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2> Else</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff size=2>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2> Controls("Field" & outer
& "_" & CStr(i)).Visible = False</FONT></SPAN></DIV></FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2> End If</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2> 'or</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff size=2><SPAN
class=321515611-01082003><FONT face=Arial color=#0000ff
size=2> Controls("Field" & outer
& "_" & CStr(i)).Visible = (outer =
Cint(ShowIndex))</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff size=2>
Next inner</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff size=2>Next
outer</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff size=2>End
Function</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2></code></FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff size=2>or use
this simplified version to replace the If block:</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2><snip></FONT></SPAN><SPAN class=321515611-01082003><FONT face=Arial
color=#0000ff size=2></DIV>
<DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff size=2><SPAN
class=321515611-01082003><FONT face=Arial color=#0000ff
size=2> Controls("Field" & outer
& "_" & CStr(i)).Visible = (outer =
Cint(ShowIndex))</FONT></SPAN></FONT></SPAN></DIV></FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2></snip></FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial color=#0000ff
size=2>Assuming <FONT color=#000000>chbProductcode1</FONT><FONT color=#0000ff>
through 5 are controls call this function from each of the (</FONT><FONT
color=#000000>chbProductcode1) click or change event passing in the name of the
calling control:</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial
size=2><usage></FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial
size=2>Sub chbProductcode1_Click()</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial size=2>
ShowHide(chbProductcode1)</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial size=2>End
Sub</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT face=Arial
size=2></usage></FONT></SPAN></DIV>
<P><FONT face=Arial><FONT size=2><SPAN
class=321515611-01082003>HTH</SPAN>,</FONT></FONT> </P>
<P><FONT face=Arial size=2>Jim DeMarco</FONT> <BR><FONT face=Arial
size=2>Director of Product Development</FONT> <BR><FONT face=Arial
size=2>HealthSource/Hudson Health Plan</FONT> </P>
<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> 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></FONT></DIV>
<DIV><FONT face=Arial size=2>Hello Scott an the rest of the group</FONT></DIV>
<DIV> </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> </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><FONT SIZE=3><BR>
<BR>
***********************************************************************************<BR>
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".<BR>
***********************************************************************************<BR>
</FONT>
</BODY></HTML>