My users are clever enough to find problems that I'm not smart enough to solve.
I'm using Access 2007.
My macro runs a query and opens a report. If the user closes the report and goes back to the form, they can choose a different report, and everything works fine.
However, my users will open several reports at a time. They use the document tabs to go back to the form instead of closing the reports. Eventually, they click the button again for a report that is already open. When this happens, an error occurs. A query cannot be run when it is in use by an open report.
At first, I thought the easy solution is turn off those document tabs. I've searched the forums a whole day and that appears to be impossible to do with VBA.
So my next idea is to put a condition in the macro to check to see if the report is already open. I assume that the condition would look something like this: Reports![Qtrly Sales].Open = True
Again, searching the Access help and forums for another day finding nothing.
I remember seeing something about this a few months ago, but of course, can't remember where. Does anyone know how to do this check? Thanks!
I'm using Access 2007.
My macro runs a query and opens a report. If the user closes the report and goes back to the form, they can choose a different report, and everything works fine.
However, my users will open several reports at a time. They use the document tabs to go back to the form instead of closing the reports. Eventually, they click the button again for a report that is already open. When this happens, an error occurs. A query cannot be run when it is in use by an open report.
At first, I thought the easy solution is turn off those document tabs. I've searched the forums a whole day and that appears to be impossible to do with VBA.
So my next idea is to put a condition in the macro to check to see if the report is already open. I assume that the condition would look something like this: Reports![Qtrly Sales].Open = True
Again, searching the Access help and forums for another day finding nothing.
I remember seeing something about this a few months ago, but of course, can't remember where. Does anyone know how to do this check? Thanks!