Hi, I was wondering if anyone could help with the error I am recieving. Upon running the following code behind my Delete and Cancel buttons, I get the following Popup.
Complile Error : Method or data member not found
The code used behind my Delete and Cancel buttons is listed below:
Dim D As Database
Dim T As Recordset
If MsgBox("Are you sure you want to permamently delete this record?", 292) = 6 Then
Set D = CurrentDb()
Set T = D.OpenRecordset("TableName"
T.FindFirst "[PrimaryKey] = " & Me![PrimaryKey]
T.Delete
'Close the form
DoCmd.Close
End If
The database has recently been converted from Access 97 to Access XP, and the code has stopped working. Is there a reference that has to be checkred to allow this code to work again?
The database is split in two parts, a front end and a back end.
I hope someone is able to help, I'll be so grateful, you could save me about a week of coding!
Thanks in advance,
David Dawson
Complile Error : Method or data member not found
The code used behind my Delete and Cancel buttons is listed below:
Dim D As Database
Dim T As Recordset
If MsgBox("Are you sure you want to permamently delete this record?", 292) = 6 Then
Set D = CurrentDb()
Set T = D.OpenRecordset("TableName"
T.FindFirst "[PrimaryKey] = " & Me![PrimaryKey]
T.Delete
'Close the form
DoCmd.Close
End If
The database has recently been converted from Access 97 to Access XP, and the code has stopped working. Is there a reference that has to be checkred to allow this code to work again?
The database is split in two parts, a front end and a back end.
I hope someone is able to help, I'll be so grateful, you could save me about a week of coding!
Thanks in advance,
David Dawson