By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,293 Members | 1,399 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,293 IT Pros & Developers. It's quick & easy.

"No data" for a field

P: 2
Can anyone tell me how to report "no data" in an Access report? When a field value in the detail section is null, I want to have text that says 'No results for this group header'.
Aug 6 '07 #1
Share this Question
Share on Google+
3 Replies


Scott Price
Expert 100+
P: 1,384
Strictly off the top of my head here... Haven't tested this in my test db, but should work fine:

In the detail section of your report put a label, set the visible property to false. In the on open event of the report, put this code:

Expand|Select|Wrap|Line Numbers
  1. If IsNull([YourSourceFieldName]) Then
  2.    [YourLabelName].Visible = True
  3.    [YourLabelName].Caption = "No results for this group header."
  4. End If
May not be the perfect solution (like I said, I haven't tested this yet), but should put you on the right track.

Regards,
Scott
Aug 6 '07 #2

P: 2
Thanks! This got me moving in the right direction.
Aug 7 '07 #3

Scott Price
Expert 100+
P: 1,384
You are most welcome. Glad to be able to help a little...

One added thought from elsewhere on this site, is to place your invisible label exactly sized and equally formatted, over the text box that ordinarily carries the information. When this text box is null, make it invisible, and the label visible, and there is no change in the visible layout of the report (the label 'looks' like the text box)...


Regards,
Scott
Aug 7 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.