Me again....sorry

really would appreciate help here. Trying to insert a record and then display that record in a page called custdetails.asp after, including the auto generated cust id. This is the code I used and I'm getting the below error (in blue) and its referring to the blue line in the code, previously i had Set instead of Select and I received the error

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.

so i thought I would try Select instead and i got the error below (in blue)

Error : Microsoft VBScript comp Expected 'Case'

This is the code i used:

' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = "SET NOCOUNT ON;" & MM_editQuery & ";SELECT @" & "@IDENTITY AS Ident"
Select rsLastIdent = MM_editCmd.Execute
if NOT rsLastIdent.EOF then
LastIdent = rsLastIdent.Fields.Item("Ident").Value
end if

If (MM_editRedirectUrl <> "") Then
End If
End If

End If
If(CStr(Request("MM_insert"))<>"") Then
Response.Redirect "custdetail.asp"
End if

any help will be greatly appreciated!!