[AccessD] Code Help Please

Joe Hecht joe at anamericanjoe.us
Wed Mar 5 21:26:07 CST 2008


The following code is supposed to make sure there is an invoice number in
the text box before previewing report.

 

When I run it I get an application error msg box saying object required.

 

What have I forgotten now,

 

On Error GoTo Err_cmdPreviewPackList_Click

  Dim cancel As Boolean

  Dim lngRetval As Long

   

    

          

    If Me.txtQBInvoice Is Null Then

      lngRetval = MsgBox( _

      "Please Select a Quick Books Invoice Number" & vbCrLf & "Before
Running Report.", _

      vbOKOnly + vbExclamation + vbDefaultButton2, _

      "No QB Invoice Number Listed")

     

    

 

      Select Case lngRetval

      Case vbOK

      cancel = True

     

    

  End Select

  End If

  

TIA

 

Joe Hecht

Joe at anamericanjoe.us

 




More information about the AccessD mailing list