kermitforney
Technical User
I am getting an error message in my VBA somewhere,
"Error in module frmVendorItems in procedure Form_Current Overflow"
"Error in module frmVendorItems in procedure Form_Current Overflow"
Code:
Private Sub Form_Current()
Const kstrProcName As String = "Form_Current"
On Error GoTo TRAP
UpdateNoteCmd Me.Name
'Make the combo boxes visible if new record, otherwise the text boxes.
'This is because I couldn't figure out how to get Access searching
'to work properly on a combo box.
lblcboItemID.Visible = Me.NewRecord
lblcboCommID.Visible = Me.NewRecord
cbolngVendorID.Visible = Me.NewRecord
cbolngItemID.Visible = Me.NewRecord
lbltxtItemID.Visible = Not Me.NewRecord
lbltxtCommID.Visible = Not Me.NewRecord
txtCommName.Visible = Not Me.NewRecord
txtItemDesc.Visible = Not Me.NewRecord
'The each cost is not stored in the DB, rather it is calculated and
'displayed on this form
If (Not Me.NewRecord) Then
Dim strEachCost As String
strEachCost = CStr(Round(Me.monBaseCaseCost / Me.intItemsPerCase, 4))
txtEachCost.Value = "$" + strEachCost
Else
txtEachCost.Value = "$0.00"
End If
CLEANUP:
Exit Sub
TRAP:
MsgBox "Error in module " & kstrModuleName & vbCrLf _
& "in procedure " & kstrProcName & vbCrLf _
& Err.Description, vbCritical
Resume CLEANUP
End Sub