This is worth alot, since this needs to be answered quickly.
I have a MS Access DB, which I upgraded to the SQL Server. I can open the SQL server fine, but when I hit a certain point in my code it fails with the error "Run-time error '3251'" "Operation is not supported for this type of object"
Here is the code:
Dim rstcallserv As Recordset
If BttnStatus(FormNumber, LastBttn) = "ADD" Then
If Form_INCIDENT.Incno <> 0 And Form_INCIDENT.Incno <> "" Then
Set rstcallserv = DBBACKEND.OpenRecordset("CALLSERV", dbOpenDynaset, dbSeeChanges)
rstcallserv.Index = "INCNO" <<Offending code
rstcallserv.Seek "=", Form_INCIDENT.Incno << Offending code
Form_INCIDENT.details1 = !details1
Form_INCIDENT.OCCFrom = !DATECOMP
Form_INCIDENT.OCCTo = !DATECOMP
Form_INCIDENT.ReviewDate = !DATECOMP
Form_INCIDENT.TimeFrom = !TIMECOMP
Form_INCIDENT.TimeTo = !TIMECOMP
Me!Incno.BackColor = 16777215
The error pops up at the .index statement, and if I comment that out, it appears on the .seek as well. I looked through MSDN, and they suggest it could be because the table is read-only. But its not. This code works perfectly in an all MS-Access setup. Is there a substitute to the .index & .seek command for sql?
What this code does, is after you put in an incident number, it then retrieves data in another table based off of that incident number.