none
Service Management can't find field '/1' refferred to in your expression

    Question

  • I am running Access 2010, using the work order template.

    I am attempting to customize everything to fit my company's needs.  Not sure what I did, but clearly something is wrong in my expression.  Can someone please help identify the issue?  Here is the coding...

    Option Compare Database
    Option Explicit


    Private Sub Form_Activate()
    On Error GoTo Err_Form_Activate
        Me![Workorders by Customer Subform].Requery

    Exit_Form_Activate:
        Exit Sub

    Err_Form_Activate:
        MsgBox Err.Description
        Resume Exit_Form_Activate
    End Sub
    Private Sub Workorders_Click()
    On Error GoTo Err_Workorders_Click
        If IsNull([CustomerID]) Then
            MsgBox "Enter customer information before entering workorder."
        Else
            DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
            DoCmd.OpenForm "Workorders"
        End If

    Exit_Workorders_Click:
        Exit Sub

    Err_Workorders_Click:
        MsgBox Err.Description
        Resume Exit_Workorders_Click
    End Sub

    Private Sub PrintInvoice_Click()
    On Error GoTo Err_PrintInvoice_Click
        If Forms![Workorders by Customer]![Workorders by Customer Subform].Form.RecordsetClone.RecordCount = 0 Then
            MsgBox "There is no data for this report. Canceling report..."
        Else
            DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
            DoCmd.OpenReport "Invoice", acPreview
        End If

    Exit_PrintInvoice_Click:
        Exit Sub

    Err_PrintInvoice_Click:
        If Err <> 2501 Then
            MsgBox Err.Description
        End If
        Resume Exit_PrintInvoice_Click
    End Sub

    Thursday, November 1, 2018 2:33 PM

All replies