i need to auto increment the last digit in the returned value of the following, how do I do this, and it needs to be reset daily. is this even possible?
<code snip>
<%
Dim sRMAstring
Dim sTDate
Dim sRMAnum
Dim iLastRMA
Dim sRuser
Dim sUser
Dim vDate
'** Todays Date in this format (ie 012202 NOT 01/22/02)
vDate = Date()
vMonth = Month(vDate)
if len(vMonth) < 2 then vMonth = "0" & vMonth
vDay = Day(vDate)
if len(vDay) < 2 then vDay = "0" & vDay
vYear = Right(Year(vDate), 2)
sTDate = vMonth & vDay & vYear
'** get iLastRMA from the database
sRMAnum = rsRMAEntry.Fields.Item("RMAnum"
.Value
iLastRMA = Left(sRMAnum, 9)
'** request & format sRuser from server
sUser = Request.ServerVariables("REMOTE_USER"
sUser = mid(sUser, 5)
sRuser = sUser
'*** the finished RMA # in string format
sRMAstring = sTDate & Left(sRuser,1) & Right(sRuser,1) & CStr(CInt(iLastRMA + 1))
%>
<code snip>
<%
Dim sRMAstring
Dim sTDate
Dim sRMAnum
Dim iLastRMA
Dim sRuser
Dim sUser
Dim vDate
'** Todays Date in this format (ie 012202 NOT 01/22/02)
vDate = Date()
vMonth = Month(vDate)
if len(vMonth) < 2 then vMonth = "0" & vMonth
vDay = Day(vDate)
if len(vDay) < 2 then vDay = "0" & vDay
vYear = Right(Year(vDate), 2)
sTDate = vMonth & vDay & vYear
'** get iLastRMA from the database
sRMAnum = rsRMAEntry.Fields.Item("RMAnum"
iLastRMA = Left(sRMAnum, 9)
'** request & format sRuser from server
sUser = Request.ServerVariables("REMOTE_USER"
sUser = mid(sUser, 5)
sRuser = sUser
'*** the finished RMA # in string format
sRMAstring = sTDate & Left(sRuser,1) & Right(sRuser,1) & CStr(CInt(iLastRMA + 1))
%>