<!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.00.2920.0" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=176254809-20022003>Hi
Group,</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=176254809-20022003>I will
try in my best englisch to make this problem clear to you. Hope it works:-)
</SPAN></FONT><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003>I have a table in my database with an autonumber field
and a field wich contains ordernumers. It looks like this</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003>OR_NUMMER
OR_OD_NUMMER</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003>1000
10</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003>1001
10</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003>1002
10</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003>1003 11</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003>1004 11</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003>1005
10</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003>1007 12</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003>1008
10</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=176254809-20022003>Now we
want to print on a report the actual orderposition of a current record. For
example ordernumber 10 contains rownumbers 1000, 1001,1002,1005,1008. We would
like to print 1, 2, 3, 4, 5 according to the actuel rownumbers. I have tried to
make this happen to take parts of the actual autonumber but that is not
sufficient enough.</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=176254809-20022003>What I
am trying is to make a function whicht take the current recordset and put in a
field with a number a calculatie in the function.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003>FncRownumber(ByRef rs as dao.recordset)
</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003> Dim Rownumber as
long</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003> </SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003> rs.movefirst</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003> Do while not
rs.eof</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003> Rownumber =
Rownumber + 1</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003>
rs.movenext</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003> loop</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=176254809-20022003>End
function</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003> </SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=176254809-20022003>It
works but I cannot get this in the report because then I lose the
recordset.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=176254809-20022003>Are
there other ways to make this happen exept putting an extra field in the table
which contains this recordnumber?</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=176254809-20022003>Thanks, Marcel Vreuls</SPAN></FONT></DIV>
<BLOCKQUOTE> </BLOCKQUOTE></BODY></HTML>