Hi, any help would be appreciated on this, and I suspect I know the reason as to why it is happening - I recently split my database into a front and back end.
I have the following code to delete records on alot of my forms....
Dim D As Database
Dim T As Recordset
If MsgBox("Do you wish to delete this supervisor?", 292) = 6 Then
Set D = CurrentDb()
Set T = D.OpenRecordset("Supervisors"
T.Index = "PrimaryKey"
T.Seek "=", Me![Full Name]
T.Delete
'Requery the form to make the deleted record disappear
Me.Requery
End If
Since I split the Database and added security, I get the error "Runtime error 3251 : Operation is not supported for this type of object". Upon pressing the debug button it goes straight to this line of code...
T.Index = "PrimaryKey"
I understand that it may be because my Tables are not local to the database file anymore, or something to that effect, but I'm not completely sure on how to fix it, I only started doing the basics of Access Basic coding a few weeks ago, and haven't done anything more complicated than changing the focus of things and changing visibility of items.
Any help would be greatfully appreciated, and if necessary I can email the database files to people if it would help.
Thanks in advance for any help,
David Dawson
I have the following code to delete records on alot of my forms....
Dim D As Database
Dim T As Recordset
If MsgBox("Do you wish to delete this supervisor?", 292) = 6 Then
Set D = CurrentDb()
Set T = D.OpenRecordset("Supervisors"
T.Index = "PrimaryKey"
T.Seek "=", Me![Full Name]
T.Delete
'Requery the form to make the deleted record disappear
Me.Requery
End If
Since I split the Database and added security, I get the error "Runtime error 3251 : Operation is not supported for this type of object". Upon pressing the debug button it goes straight to this line of code...
T.Index = "PrimaryKey"
I understand that it may be because my Tables are not local to the database file anymore, or something to that effect, but I'm not completely sure on how to fix it, I only started doing the basics of Access Basic coding a few weeks ago, and haven't done anything more complicated than changing the focus of things and changing visibility of items.
Any help would be greatfully appreciated, and if necessary I can email the database files to people if it would help.
Thanks in advance for any help,
David Dawson