I have looked at several coding examples on printing an access report within VB, but am having a problem with the .OpenCurrentDat abase command. When executed, I get the message "Database is already open". If I comment out this command and just execute the .DoCmd.OpenRepo rt, I get the message "You can't carry out this action at the present time"
The code looks like this:
With objAccess
.OpenCurrentDat abase filepath:="path name"
.DoCmd.OpenRepo rt "reportname "
End With
I have no problem when printing from another (closed) database, but I am stumped on how to print from an active database.
The code looks like this:
With objAccess
.OpenCurrentDat abase filepath:="path name"
.DoCmd.OpenRepo rt "reportname "
End With
I have no problem when printing from another (closed) database, but I am stumped on how to print from an active database.