I have a table with three fields:
AutoID : AutoNumber
Name: Text
RecordID: Number "Long Integer"
I have created a form that aytomatically starts a new record and I have also
placed the following Code in the form's module:
Private Sub Form_Current()
' Comments: If this is the first entry then set the RequestID to 1,
' else find the maximum RequestID and add 1 to it.
If Not IsNull(DMax("[RequestID]", "tblMain")) Then
Me.RequestID = DMax("[RequestID]", "tblMain") + 1
Else
Me.RequestID = 1
End If
End Sub
I have saved the form as a Data Access page but the code doesn't work and
I couldn't find a code simialr to that which I can use in my html page?!
Maybe I can use ADO to open a recordset ans search for the maximum value
but I don't know the exact code and how to write the result back to the
recordID field in the html page?
Thank you.
AutoID : AutoNumber
Name: Text
RecordID: Number "Long Integer"
I have created a form that aytomatically starts a new record and I have also
placed the following Code in the form's module:
Private Sub Form_Current()
' Comments: If this is the first entry then set the RequestID to 1,
' else find the maximum RequestID and add 1 to it.
If Not IsNull(DMax("[RequestID]", "tblMain")) Then
Me.RequestID = DMax("[RequestID]", "tblMain") + 1
Else
Me.RequestID = 1
End If
End Sub
I have saved the form as a Data Access page but the code doesn't work and
I couldn't find a code simialr to that which I can use in my html page?!
Maybe I can use ADO to open a recordset ans search for the maximum value
but I don't know the exact code and how to write the result back to the
recordID field in the html page?
Thank you.