J
JIM
I picked up the following code from an answer Arvin Meyer gave:
Private Sub Check_Closed_Click()
On Error GoTo Error_Handler
If Me.Check_Closed = True Then
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("tblBillableWOs", , dbAppendOnly)
With rst
.AddNew
!CustomerName = Me.cboCustomerName
!WONo = Me.txtWoNo
.Update
.Close
End With
Exit_Here:
rst.Close
Set rst = Nothing
Set db = Nothing
Error_Handler:
MsgBox Err.Number & ": " & Err.Description
Resume Exit_Here
End If
End Sub
It compiles fine but when Check_Closed box is checked error msg 3420
displays and just hangs up my computer and I have to re-boot. The subroutine
is supposed to append to tbleBillableWOs, just two fields. What am I doing
wrong?
TIA
Private Sub Check_Closed_Click()
On Error GoTo Error_Handler
If Me.Check_Closed = True Then
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("tblBillableWOs", , dbAppendOnly)
With rst
.AddNew
!CustomerName = Me.cboCustomerName
!WONo = Me.txtWoNo
.Update
.Close
End With
Exit_Here:
rst.Close
Set rst = Nothing
Set db = Nothing
Error_Handler:
MsgBox Err.Number & ": " & Err.Description
Resume Exit_Here
End If
End Sub
It compiles fine but when Check_Closed box is checked error msg 3420
displays and just hangs up my computer and I have to re-boot. The subroutine
is supposed to append to tbleBillableWOs, just two fields. What am I doing
wrong?
TIA