Results 1 to 3 of 3

Thread: error - Object required 'DoCmd'

  1. #1
    Guest

    Question

    I am trying to automatically export from my Outlook98 form: Access97 to excel97. I have a command button to do the process. I keep getting the following error.

    Object required 'DoCmd'

    This is the line I am using:

    Sub excel1
    DoCmd.outputTo acOutputQuery,"termexcel",acFormatXLS, & _ "C:\temp\term2001.xls",false
    end sub

    Can someone see what I am doing wrong.

  2. #2
    Guest
    What is DoCmd? Did you set or dim it as an Object?

  3. #3
    Junior Member
    Join Date
    Oct 2000
    Location
    Purgatory
    Posts
    31
    I don't think 'DoCmd' is a visual basic command. I think it can only be used in Access and Word.

    Paul Bousa

Posting Permissions

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



Click Here to Expand Forum to Full Width