G
Guest
Hello folks, I am wondering of anyone could help me out here.
I have a database I am building for a project with two tables . One table is
read-only, and linked to another database. The other table's data is
generated from data added to a form based on the data on the read-only tabel.
The problem is, when I run the sub, the record is not being added to the
second table.
Any suggestions?
'Update the records to the tblAHD table
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
With rst
.ActiveConnection = CurrentProject.Connection
.CursorType = adOpenKeyset
.LockType = adLockPessimistic
.Open "Select * from tblAHD where SessionID = 'Session'"
.AddNew
!SessionID = Me.txtAHDSession
!DateClosed = Now()
!Processor = Me.cmbAHDEmployees
!Dispute1Result = Me.cmbDispute1Results
!Dispute2Result = Me.cmbDispute2Results
!Dispute3Result = Me.cmbDispute3Results
End With
rst.Close
Set rst = Nothing
Exit Sub
I have a database I am building for a project with two tables . One table is
read-only, and linked to another database. The other table's data is
generated from data added to a form based on the data on the read-only tabel.
The problem is, when I run the sub, the record is not being added to the
second table.
Any suggestions?
'Update the records to the tblAHD table
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
With rst
.ActiveConnection = CurrentProject.Connection
.CursorType = adOpenKeyset
.LockType = adLockPessimistic
.Open "Select * from tblAHD where SessionID = 'Session'"
.AddNew
!SessionID = Me.txtAHDSession
!DateClosed = Now()
!Processor = Me.cmbAHDEmployees
!Dispute1Result = Me.cmbDispute1Results
!Dispute2Result = Me.cmbDispute2Results
!Dispute3Result = Me.cmbDispute3Results
End With
rst.Close
Set rst = Nothing
Exit Sub