N
news.microsoft.com
Hi,
Anyone here help me out with a bit of access? It's probably something
stilly but it's been a while since I wrote any vba.
I get the Error:
"cannot update. Database or object is read-only"
When I try and run the following code. It falls over on the rst.Edit.
Dim dbs As DAO.Database
Dim qdf As DAO.QueryDef
Dim rst As DAO.Recordset
Set dbs = CurrentDb
Set qdf = dbs.QueryDefs("SelectAbsenceEdit")
qdf.Parameters("ABSENCEID") = Me.AbsenceID.Value
Set rst = qdf.OpenRecordset()
If Not rst.EOF Then
MsgBox rst.EditMode
rst.Edit
rst!EstimatedReturnDate = Me.EstReturnDate
rst.Update
End If
Set rst = Nothing
Set qdf = Nothing
Set dbs = Nothing
Thanks,
Rick
Anyone here help me out with a bit of access? It's probably something
stilly but it's been a while since I wrote any vba.
I get the Error:
"cannot update. Database or object is read-only"
When I try and run the following code. It falls over on the rst.Edit.
Dim dbs As DAO.Database
Dim qdf As DAO.QueryDef
Dim rst As DAO.Recordset
Set dbs = CurrentDb
Set qdf = dbs.QueryDefs("SelectAbsenceEdit")
qdf.Parameters("ABSENCEID") = Me.AbsenceID.Value
Set rst = qdf.OpenRecordset()
If Not rst.EOF Then
MsgBox rst.EditMode
rst.Edit
rst!EstimatedReturnDate = Me.EstReturnDate
rst.Update
End If
Set rst = Nothing
Set qdf = Nothing
Set dbs = Nothing
Thanks,
Rick