Ashfaque
Search Beautiful Girls from your town for night
- Local time
- Today, 05:46
- Joined
- Sep 6, 2004
- Messages
- 897
Hi,
My main form has a subform that displaying relevant records once I select record from combo on min form. My subform Data Entry has set to No.
There is a fields on main form called PWDmgr after updating which I am getting relevant department head name and placing on main form.
The main question is my code has stuck on rst.edit saying "Can not update. Database or Object is read-only"
If I Re-set subform property Data Entry to No then no relevant record is being fetched in sub-form.
Since I deployed my BE o SQl Server, it looks server tables are giving lots of trouble to me
. Both tables has primary key as advised by honorable members of this forum
My main form has a subform that displaying relevant records once I select record from combo on min form. My subform Data Entry has set to No.
There is a fields on main form called PWDmgr after updating which I am getting relevant department head name and placing on main form.
The main question is my code has stuck on rst.edit saying "Can not update. Database or Object is read-only"
Code:
Private Sub OTApprovedBy_AfterUpdate()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("Select * from T_Dept where CDepartment=' " & Forms!F_EmpOTHeader!EmpDept & "' And PWDmgr = '" & Forms!F_EmpOTHeader!OTApprovedBy & "'", dbOpenDynaset, dbSeeChanges)
If rst.BOF = False And rst.EOF = False Then
MsgBox ("NO Match Found")
Else
rst.Edit
Me.EmpHOD = rst!DeptManager
End If
rst.Close
Set db = Nothing
End Sub
If I Re-set subform property Data Entry to No then no relevant record is being fetched in sub-form.
Since I deployed my BE o SQl Server, it looks server tables are giving lots of trouble to me
