K
Kenneth Goodwin
Hi all,
Can some one please HELP I'm using an unbound form to update two table but
I am getting this error.
If I comment out the SET EMPLOYEERS line it will save the data to bank_info
table.
The table employee_info is already opened exclusively by another user, Or it
is already open through the user interface and cannot be manipulated
programmatically.
Here is the code
Private Sub Cmdsave_Click()
On Error GoTo Err_Cmdsave_Click
Dim employeeDB As Database
Dim bankDB As Database
Dim bankRs As DAO.Recordset
Dim employeeRS As DAO.Recordset
Set bankRs = CurrentDb.OpenRecordset("bank_info")
Set employeeRS = CurrentDb.OpenRecordset("employee_info")
With bankRs
.AddNew
![accountId] = Me.accID
![Client_name] = Me.clientname
![bank_name] = Me.bankname
.update
End With
bankRs.Close
With employeeRS
.AddNew
![Fname] = Me.Fname
![Lname] = Me.Lname
![hrate] = Me.payrate
![employeetype] = Me.employeetype
.update
End With
employeeRS.Close
Kenneth
(e-mail address removed)
Can some one please HELP I'm using an unbound form to update two table but
I am getting this error.
If I comment out the SET EMPLOYEERS line it will save the data to bank_info
table.
The table employee_info is already opened exclusively by another user, Or it
is already open through the user interface and cannot be manipulated
programmatically.
Here is the code
Private Sub Cmdsave_Click()
On Error GoTo Err_Cmdsave_Click
Dim employeeDB As Database
Dim bankDB As Database
Dim bankRs As DAO.Recordset
Dim employeeRS As DAO.Recordset
Set bankRs = CurrentDb.OpenRecordset("bank_info")
Set employeeRS = CurrentDb.OpenRecordset("employee_info")
With bankRs
.AddNew
![accountId] = Me.accID
![Client_name] = Me.clientname
![bank_name] = Me.bankname
.update
End With
bankRs.Close
With employeeRS
.AddNew
![Fname] = Me.Fname
![Lname] = Me.Lname
![hrate] = Me.payrate
![employeetype] = Me.employeetype
.update
End With
employeeRS.Close
Kenneth
(e-mail address removed)