Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Nov 2002
    Location
    Mt. Olive, North Carolina, USA
    Posts
    170
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Type not defined (2000)

    I am not sure what has changed. The form frmPOHeader no longer is working. I went back 15 backups and they no longer work either and they all were working. I get a user-defined type not defined error when I open the form. The next number for the PO does not fill in and none of the buttons across the top work. Help.
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Type not defined (2000)

    You have the following lines near the beginning of the module for frmPOHeader:

    Dim appOutlook As New Outlook.Application
    ...
    Dim msg As Outlook.MailItem

    These lines require that you set a reference to the Microsoft Outlook 9.0 Object Library in Tools | References... (9.0 is the internal version number for Office 2000).

    Also: you have event procedures

    Private Sub Combo66_AfterUpdate()
    me.VID = me.
    End Sub

    Private Sub cbxCompany_AfterUpdate()
    Me.VID = Me.cbxCompany.Column(0)
    End Sub

    and later on a line

    cbxCompany = Null
    This code is not valid. You can safely remove it since there is no Combo66 or cbxCompany

    And:

    The functions fFileDialog, fFileDialogSnapshot and fFileDialogSavePDFname in modReportTopDF contain

    Set clsDialog = New clsCommonDialog

    But there is no class module clsCommonDialog

  3. #3
    2 Star Lounger
    Join Date
    Nov 2002
    Location
    Mt. Olive, North Carolina, USA
    Posts
    170
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Re: Type not defined (2000)

    When I open up the module and go to tools references, the Microsoft Access 9.0 object library is checked.
    The clsCommonDialog module did not make it into the stripped down version.
    The controls cbxCompany and combo66 are on the form in the real database.
    What am I missing? Do you have any other ideas?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Type not defined (2000)

    Outlook! You need a reference to the Microsoft Outlook 9.0 Object Library.

  5. #5
    2 Star Lounger
    Join Date
    Nov 2002
    Location
    Mt. Olive, North Carolina, USA
    Posts
    170
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Re: Type not defined (2000)

    Sorry that I miss read that. It is back to working. Thank you for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •