<!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.1226" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff size=2>Hi
Paul:</FONT></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff size=2>Using
a slightly different approach you could check to see if it is a number or
string.</FONT></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff size=2>if not
isnull((TheEnteredValue) then</FONT></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff
size=2> if isnumber(TheEnteredValue) then</FONT></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff
size=2> if int(TheEnteredValue) =
TheEnteredValue then</FONT></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff
size=2> if <SPAN
class=600341100-12092003><FONT face=Arial color=#0000ff
size=2> abs(TheEnteredValue)</FONT></SPAN> 32768 >
then</FONT></SPAN></DIV>
<DIV><SPAN
class=600341100-12092003>
<SPAN class=600341100-12092003><FONT face=Arial color=#0000ff size=2>msgbox
"TheEnteredValue is a long"</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><SPAN
class=600341100-12092003>
<FONT face=Arial color=#0000ff size=2>else</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><SPAN
class=600341100-12092003> <SPAN
class=600341100-12092003><FONT face=Arial color=#0000ff
size=2> msgbox "TheEnteredValue is a
integer"</FONT></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><SPAN
class=600341100-12092003>
<FONT face=Arial color=#0000ff size=2>end if</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=600341100-12092003>
<FONT face=Arial color=#0000ff size=2>else</FONT></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><SPAN class=600341100-12092003><FONT
face=Arial color=#0000ff
size=2> msgbox
"TheEnteredValue is a double
number"</FONT></SPAN>
</SPAN></DIV>
<DIV><SPAN class=600341100-12092003>
<FONT face=Arial color=#0000ff size=2>end if</FONT></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff
size=2> else</FONT></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff
size=2> msgbox "TheEnteredValue is a
string"</FONT></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff
size=2> end if</FONT></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff size=2>end
if</FONT></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff
size=2>HTH</FONT></SPAN></DIV>
<DIV><SPAN class=600341100-12092003><FONT face=Arial color=#0000ff
size=2>Jim</FONT></SPAN></DIV>
<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>
dba-vb-bounces@databaseadvisors.com
[mailto:dba-vb-bounces@databaseadvisors.com]<B>On Behalf Of
</B>paul.hartland@fsmail.net<BR><B>Sent:</B> Thursday, September 11, 2003 3:40
AM<BR><B>To:</B> dba-vb<BR><B>Cc:</B> accessd<BR><B>Subject:</B> [dba-VB]
Getting Field Type From ADO Control<BR><BR></FONT></DIV>
<P>To all,</P>
<P>I have a field selection box in a find form that I have created myself, but
what I need to know is what datatype the field is that the user selects.</P>
<P>Has anyone ever done this and can tell me how....I tried the following line
of code which runs through all the fields but it returns a number......</P>
<P>MsgBox frmPersonnel.ADOPersonnel.Recordset.Fields(fldCounter).Type</P>
<P>Anyone have any ideas ?</P>
<P>Thanks in advance for any help received.......</P>
<P>Paul Hartland</P>
<P>Database Designer/Programmer</P></BLOCKQUOTE></BODY></HTML>