I use a datasheet to list projects. Clicking on project ID opens form with selected record. Allow Edits = Yes, Data Entry = No, Record Locks = Edited Record. When I first saved edited record, changes were saved to first record in table, not correct record. So added RS.FindFirst "ProjectID = " & me.txtProjectRecordNumber.
Then started getting Runtime error 3188 Could not update; currently locked by another session. I thought the original open datasheet might be the culprit so I added code to close the datasheet after the form opens - same error. Next I tried adding a line in the code to change the recordlocks to 0 (Forms("tblProjectControl"
cks=0) which solved the issue with the locked form but this refreshes the form (calls CurrentForm) and causes lots of other problems. How can I fix?
Dim DB As DAO.Database
Dim rst As DAO.Recordset
Set DB = CurrentDb
Set rst = DB.OpenRecordset("tblProjectControl")
.FindFirst "ProjectID = " & Me.txtProjectNumber
!RequestDT = Me.txtRequestDT
!RequestHR = Me.txtRequestTime
!Insert_User = Me.txtGetUser
!ImpactnoAction = Me.txtImpactnoAction
!Justification = Me.txtJustification