Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002

    Unanswered: Opening Access from Visual Basic

    I have a visual basic front end to an Access database. In the access database is a report that i would like to print from a button on the VB form. I have loaded the Access references so i use the command
    DoCmd.OpenReport ("rptResults")
    This opens the report and prints it fine so long as the database is physically open on the desktop however if it is just opened in memory i get an error message Run-time error 2486.
    Does anyone know how i can either print the report without opening Access or how i can physically open the database in code before the report prints and then close it again.
    Any help would be appreciated



  2. #2
    Join Date
    Sep 2001
    Chicago, Illinois, USA
    You're answer is in the thread named "Access and Excel" about 30 threads ago.

Posting Permissions

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