<!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 Jim and rest of the group,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>sorry for the late responce. I have been on
holliday.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>When i use the code you gave me, i get an
compile error: Sub or Function not defined. <FONT color=#0000ff>Controls
</FONT><FONT color=#000000>is selected.</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>I can't find the missing reference, or is there
someting else wrong</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Also i don't understand why jou use: <SPAN
class=321515611-01082003><FONT color=#0000ff face=Arial size=2>Dim inner As
Integer. <FONT color=#000000>There isn't an: inner, in the
code</FONT></FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=321515611-01082003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2>Can You help me.</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>
<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:Jdemarco@hshhp.org" title=Jdemarco@hshhp.org>Jim DeMarco</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> Friday, August 01, 2003 2:08
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [AccessD] select more then
one</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial size=2>How
about something like this:</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2><code></FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2>Function ShowHide(ctl as Control)</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial size=2>Dim
inner As Integer</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial size=2>Dim
outer as Integer</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial size=2>Dim
ShowIndex As Integer</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2>ShowIndex = Right(ctl.Name, 1)</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2>For outer = 1 To 5</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2> For i = 1 To 26</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2> If outer = Cint(ShowIndex)
Then</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2> Controls("Field" &
ShowIndex & "_" & CStr(i)).Visible = True</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2> Else</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial size=2>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2> Controls("Field" & outer
& "_" & CStr(i)).Visible =
False</FONT></SPAN></DIV></FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2> End If</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2> 'or</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2> Controls("Field" & outer
& "_" & CStr(i)).Visible = (outer =
Cint(ShowIndex))</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2> Next inner</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial size=2>Next
outer</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial size=2>End
Function</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2></code></FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial size=2>or
use this simplified version to replace the If block:</FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2><snip></FONT></SPAN><SPAN class=321515611-01082003><FONT
color=#0000ff face=Arial size=2></DIV>
<DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
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 color=#0000ff face=Arial
size=2></snip></FONT></SPAN></DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=321515611-01082003><FONT color=#0000ff face=Arial
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></BODY></HTML>