<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1141" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=968063314-22032003><FONT face=Arial color=#0000ff
size=2>Everything can be done, Virginia. Since the document-type prefixes seem
to be different lengths, you'll have to examine each one separately. It would be
more convenient if they were all the same length (i.e. CPP is equivalent to C
since no other document type starts with C).</FONT></SPAN></DIV>
<DIV><SPAN class=968063314-22032003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=968063314-22032003><FONT face=Arial color=#0000ff
size=2>Something like this:</FONT></SPAN></DIV>
<DIV><SPAN class=968063314-22032003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=968063314-22032003><FONT face=Arial color=#0000ff size=2>If
Left(txtDocumentID1) = "Z" Then</FONT></SPAN></DIV>
<DIV><SPAN class=968063314-22032003> <FONT face=Arial
color=#0000ff size=2>strFormName = "frmServiceOrders"</FONT></SPAN></DIV>
<DIV><SPAN class=968063314-22032003> <FONT face=Arial
color=#0000ff size=2>strQuery = "ServiceID = " &
txtDocumentID</FONT></SPAN></DIV>
<DIV><SPAN class=968063314-22032003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=968063314-22032003>ElseIf
Left(txtDocument, 3) = "CPP" Then
<DIV><SPAN class=968063314-22032003> <FONT face=Arial
color=#0000ff size=2>strFormName =
"frmReviews"</FONT></SPAN></DIV></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=968063314-22032003>
<DIV><SPAN class=968063314-22032003> <FONT face=Arial
color=#0000ff size=2>strQuery = "ReviewID = " &
txtDocumentID</FONT></SPAN></DIV>
<DIV><SPAN
class=968063314-22032003></SPAN> </DIV>ElseIf</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=968063314-22032003> ...</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=968063314-22032003> etc.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=968063314-22032003>End
If</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=968063314-22032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=968063314-22032003>DoCmd.OpenForm DocumentName := strFormName,
WhereCondition := strQuery</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=968063314-22032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=968063314-22032003>HTH,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=968063314-22032003>Arthur</SPAN></FONT></DIV><!-- Converted from text/plain format -->
<P><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-admin@databaseadvisors.com [mailto:accessd-admin@databaseadvisors.com]
<B>On Behalf Of </B>Hollis,Virginia<BR><B>Sent:</B> March 22, 2003 9:13
AM<BR><B>To:</B> 'accessd@databaseadvisors.com'<BR><B>Subject:</B> [AccessD]
Open diff forms based on number<BR><BR></FONT></P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT face=Arial size=2><SPAN class=650310014-22032003>I have a search
form that I would like to show the actual record opened in a separate
form when the number is clicked. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=650310014-22032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=650310014-22032003>The only problem,
the search results list different types of documents so clicking the
number would require a different form to be opened based on the number
selected. The same type of documents begin with the same numbering scheme. For
example, service orders all being with Z, Reviews begin with CPP, etc. Each
type of document is different and has it's own screen because they contain
different data (so I can't use one screen for all results when the number is
clicked).</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=650310014-22032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=650310014-22032003>The only thing I
can think to base the results on is the numbering scheme? If the number is
like Z open service orders, if the number is Like CPP, open the review
form.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=650310014-22032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=650310014-22032003>Really not sure
how I can do this or if it can be done?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=650310014-22032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=650310014-22032003>Virginia</SPAN></FONT></DIV></BLOCKQUOTE></BODY></HTML>