A few problems.
First of all, what is the DATA TYPE of the field subscribe in your table?
Is it YES/NO? Or TEXT? Or a number???
I am going to *assume* it is YES/NO. If not, tell us and it's an easy change.
Big problem: Your SQL query is totally bogus.
How can you SELECT fields from the table tbldetails when the only table you mention in the FROM clause is tblcomments???
SELECT tbldetails.firstname, tbldetails.surname, tbldetails.subscribe, FROM tblComments
Also, you have a bogus extra comma after the last field name there, before the FROM.
If you are going to use ADDNEW with a recordset, it's almost always a better idea to use *ONLY* the table name and *NOT* do a SELECT. (If you must do a SELECT, then this is one case it should be SELECT *.)
Set adoCon = Server.CreateObject("ADODB.Connection")
' the Access Driver is very very old and very buggy...you really should use JET OLEDB
adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source = " & Server.MapPath("Newsletter.mdb")
Set rsAddComments = Server.CreateObject("ADODB.Recordset")
' when you use ADDNEW, you should use the whole table, not just SELECT some fields
' so no SQL query
' cursor type 2 is not properly usable with ASP code...type 3 is much better
' and no reason to set cursor type and lock type ahead of time...
' open the recordset using just the name of the table; set cursor type and lock type at same time:
rsAddComments.Open "tblComments", adoCon, 3, 3
'Tell the recordset we are adding a new record to it
'Add a new record to the recordset
rsAddComments.Fields("Firstname") = Request.Form("firstname")
rsAddComments.Fields("Surname") = Request.Form("surname")
' this assumes the Register field ind DB is a boolean (YES/NO) field:
' the comparison of <> "" will only only be true if the field was checked
rsAddComments.Fields("Register") = ( TRIM(Request.Form("register")) <> "" )
' instead of redirecting, just include the message here...faster by a long shot!
<!-- #include file="complete_message.html" -->