I have a button on a form that deletes a record. This code worked fine when the backend tables were Access tables. But when the backend was moved to SQL server I am now getting the following error:
"You must use the dbSeeChanges option with OpenRecordset when assessing a SQL Server table that has an IDENTITY column."
I am guessing I need to change the syntax of the dsql string (remove the *?) and perhaps change how I am handling the recordset, but I've tried a variety of things with no luck.
Private Sub btnDelete_Click()
Dim dSql As String, usrResponse
usrResponse = MsgBox("Are you sure you want to delete this record?", vbYesNo, "Delete Record")
If usrResponse = vbYes Then
dSql = "delete * from Admits where [Admit Key]=" & Me.[txtAdmitKey]
DoCmd.Close acForm, "frm_adm_detail"
DoCmd.Close acForm, "frm_adm_edit"
Thanks so much for your help.