If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
can't get rid of a blank report
I have a macro that opens a report and then I email the
result. If the report is blank I get a type mismatch error 3 times. I believe the 1st one is when it is opened and the 2nd when it is printed and the 3rd one when I try to email the report. I have to print a report for 50 differnt accounts and my macro looks like this open report (with condition acct number = 1000 and date =) send object close report open report (with condition acct number = 1001 and date =) send object close report etc.... If there is no records for a specific account number in that date range how would I stop the macro from giving me the type mismatch errors. Thanks for all of the help!!! |
#2
|
|||
|
|||
can't get rid of a blank report
Cancel the NoData event of the report.
That will probably give your macro a different error, saying the OpenReport was cancelled (error 2501). To avoid that error, you need to use VBA code instead of a macro, and include error handling that just ignores that error. One of the most severe limitations of macros is that they contain no error handling. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. wrote in message ... I have a macro that opens a report and then I email the result. If the report is blank I get a type mismatch error 3 times. I believe the 1st one is when it is opened and the 2nd when it is printed and the 3rd one when I try to email the report. I have to print a report for 50 differnt accounts and my macro looks like this open report (with condition acct number = 1000 and date =) send object close report open report (with condition acct number = 1001 and date =) send object close report etc.... If there is no records for a specific account number in that date range how would I stop the macro from giving me the type mismatch errors. Thanks for all of the help!!! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Scattered Blank Pages in Report | I am Jack's Screwy Report | Setting Up & Running Reports | 4 | July 30th, 2004 11:16 PM |
Unwanted Blank Lines in Report | Christen | Setting Up & Running Reports | 1 | July 8th, 2004 09:54 AM |
Label | SRIT | General Discussion | 2 | June 22nd, 2004 09:42 PM |
Every other page in my report prints blank | David | Setting Up & Running Reports | 2 | June 1st, 2004 11:46 PM |
Help Printing a Report with Blank Fields | Jen | New Users | 6 | May 1st, 2004 02:32 PM |