Welcome Guest ( Log In | Click here to Register a free account now! )
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Mar 18 2009, 11:26 AM
Post
#1
|
|
|
Member ![]() ![]() Group: Members Posts: 76 Joined: 15-October 08 Member No.: 246,857 |
in Access is there a way to create a macro that is linked to a report? eg. i hav a query that i've linked to a report, but sometimes there are no results in the report, so a blank report just shows. is there a way that instead of the blank report appearing when there are no results, there is a message box that says 'no results' or something along those lines? thanks |
|
|
|
![]() |
Mar 18 2009, 04:37 PM
Post
#2
|
|
|
BleepIN--BleepOUT ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,220 Joined: 21-October 04 Member No.: 3,911 |
Most likely, but I'm not sure, if you put a calculated field in the footer of the report and the calculation says something like 'if number of records=0 ... put out "No records".
|
|
|
|
Mar 22 2009, 09:34 AM
Post
#3
|
|
|
Member ![]() ![]() Group: Members Posts: 76 Joined: 15-October 08 Member No.: 246,857 |
i have another issue now. I've mail merged between access and word but now i dont know how to create a button with a macro to run the mail merge. the mail merge is dependent on a parameter query.
could anyone help me out please. thanks |
|
|
|
Jun 19 2009, 05:08 PM
Post
#4
|
|
|
New Member ![]() Group: Members Posts: 10 Joined: 19-June 09 Member No.: 343,619 |
Hi...
You could write some VBA code to display a msgbox for your blank report. On the report there is an event called 'OnNoData'. If you add code to this event, when your report is blank, you can display a msgbox with something like 'no data found'. |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 22nd November 2009 - 01:01 AM |