How to stop reports printing with blank fields

B

Bluenose

Hi. Newbie here.
I have built a simple macro to open a report based on a query, print the
reports generated from the query, run an update query to update all the
records in a table as printed, and then close. This is with the intention
that only records which have been added to the table since the last 'print
run' will print out the next time the macor is run. I have 2 problems:

Firstly, if the initial query (on which the report is based) does not return
any 'new' records, I am still getting a report template printing off (with no
filled-in fields)when the macro is run. How can I prevent this 'blank' report
printing off?

Secondly, when I have resolved the first problem, I want to schedule the
macro to run every half an hour to check for new entries to the table and
print them if there are any. I had planned to use the windows task scheduler
but this seems to only allow scheduling with a minimum frequency of 'daily.'

I am new to access but am keen to learn an would greatly appreciate any help
and advice on either of these problems.

Lee
 
B

Bluenose

Ok, i'm getting there faster than you can post replies!

I have managed to get round the 'printing reports with no data' problem by
creating a CancelEvent macro and associating it with the 'On No Data' Event
properties of the form itself. Bingo! Isn't Access great?

Now I shall concentrate my efforts on scheduling every 30 minutes. I have a
feeling the answer is easy, it's just finding it that's the problem!
 
B

Bluenose

I'm good now, thanks. I figured out how to use advanced settings in windows
task scheduler.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top