×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Report missing information

Report missing information

Report missing information

(OP)
I need to make a report that will show me all the the data not filled in in a particular record. I have 91 fields that I need to query and only those that are empty I need to indicate on the report in some way. By placing all the text boxes in the report makes it too long so I want to code some vb to do the checks and then only display those fields which are empty. Because the text box is empty or null I have to make the label display a value. Here is an example of what I have done, but it has one problem, the label keeps being overwritten.
'Title
If IsNull(Me![Title]) Then
CaptionText = "Title"
MissingDataLabel.Caption = CaptionText
End If
'Birthdate
If IsNull(Me![Birthdate]) Then
CaptionText = "BirthDate"
MissingDataLabel.Caption = CaptionText
End If

RE: Report missing information

Hi Umbane,

I'd consider using a variable string, and appending the name of the field which is empty to the end of each field found that is empty, ie:

Dim lblMissing as text
lblMissing=""

'Title
If IsNull(Me![Title]) Then
lblMissing = "Title" & ", "
End If

'Birthdate
If IsNull(Me![Birthdate]) Then
lblMissing = lblMissing & "BirthDate" & ", "
End If
...

MissingDataLabel.Caption = left(lblMissing,len(lblMissing)-2)

end sub


It seems a bit cludgy to me, but looks like it would work.
Drew

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close