Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report missing information

Status
Not open for further replies.

Umbane

IS-IT--Management
Jul 20, 2000
44
ZA
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.<br>'Title<br>If IsNull(Me![Title]) Then<br>CaptionText = &quot;Title&quot;<br>MissingDataLabel.Caption = CaptionText<br>End If<br>'Birthdate<br>If IsNull(Me![Birthdate]) Then<br>CaptionText = &quot;BirthDate&quot;<br>MissingDataLabel.Caption = CaptionText<br>End If<br>
 
Hi Umbane,<br><br>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:<br><br>Dim lblMissing as text<br>lblMissing=&quot;&quot;<br><br>'Title<br>If IsNull(Me![Title]) Then<br>lblMissing = &quot;Title&quot; & &quot;, &quot;<br>End If<br><br>'Birthdate<br>If IsNull(Me![Birthdate]) Then<br>lblMissing = lblMissing & &quot;BirthDate&quot; & &quot;, &quot;<br>End If<br>...<br><br>MissingDataLabel.Caption = left(lblMissing,len(lblMissing)-2)<br><br>end sub<br><br><br>It seems a bit cludgy to me, but looks like it would work.<br>Drew<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top