Here is ALL my code: It only returns the value of "1", it never adds "1" to the returned value. I can have the number 20 returned but it will not add 1 to it..!!???
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/rma.asp" -->
<%
set rsLastRMAnum = Server.CreateObject("ADODB.Recordset"

rsLastRMAnum.ActiveConnection = MM_rma_STRING
rsLastRMAnum.Source = "SELECT RMAnum FROM RMA_Entry"
rsLastRMAnum.CursorType = 3
rsLastRMAnum.CursorLocation = 2
rsLastRMAnum.LockType = 3
rsLastRMAnum.Open()
rsLastRMAnum_numRows = 0
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
' set the record count
rsLastRMAnum_total = rsLastRMAnum.RecordCount
' set the number of rows displayed on this page
If (rsLastRMAnum_numRows < 0) Then
rsLastRMAnum_numRows = rsLastRMAnum_total
Elseif (rsLastRMAnum_numRows = 0) Then
rsLastRMAnum_numRows = 1
End If
' set the first and last displayed record
rsLastRMAnum_first = 1
rsLastRMAnum_last = rsLastRMAnum_first + rsLastRMAnum_numRows - 1
' if we have the correct record count, check the other stats
If (rsLastRMAnum_total <> -1) Then
If (rsLastRMAnum_first > rsLastRMAnum_total) Then rsLastRMAnum_first = rsLastRMAnum_total
If (rsLastRMAnum_last > rsLastRMAnum_total) Then rsLastRMAnum_last = rsLastRMAnum_total
If (rsLastRMAnum_numRows > rsLastRMAnum_total) Then rsLastRMAnum_numRows = rsLastRMAnum_total
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (rsLastRMAnum_total = -1) Then
' count the total records by iterating through the recordset
rsLastRMAnum_total=0
While (Not rsLastRMAnum.EOF)
rsLastRMAnum_total = rsLastRMAnum_total + 1
rsLastRMAnum.MoveNext
Wend
' reset the cursor to the beginning
If (rsLastRMAnum.CursorType > 0) Then
rsLastRMAnum.MoveFirst
Else
rsLastRMAnum.Requery
End If
' set the number of rows displayed on this page
If (rsLastRMAnum_numRows < 0 Or rsLastRMAnum_numRows > rsLastRMAnum_total) Then
rsLastRMAnum_numRows = rsLastRMAnum_total
End If
' set the first and last displayed record
rsLastRMAnum_first = 1
rsLastRMAnum_last = rsLastRMAnum_first + rsLastRMAnum_numRows - 1
If (rsLastRMAnum_first > rsLastRMAnum_total) Then rsLastRMAnum_first = rsLastRMAnum_total
If (rsLastRMAnum_last > rsLastRMAnum_total) Then rsLastRMAnum_last = rsLastRMAnum_total
End If
%>
<%
Dim iLastRMA
Dim sLastRMA
'** get iLastRMA from the database
rsLastRMAnum.Movelast
iLastRMA = CStr(rsLastRMAnum("RMAnum"

)
iLastRMA = Mid(iLastRMA, 9)
sLastRMA = CStr(CInt(iLastRMA) + 1)
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="">
<input type="text" name="textfield" value="<%=iLastRMA%>">
</form>
</body>
</html>
<%
rsLastRMAnum.Close()
%> FrOg 8)