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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress Form Elements If Empty/Null

Status
Not open for further replies.

daviegravy

Programmer
Sep 7, 2006
12
US
Is there a way to not output, say a textfield and associated label, if the data source used to populate that form element is empty/null/false? I need to make some elements on my report more dynamic and having a list of empty checkboxes not only makes it cluttered, but technically serves no purpose being on there. Yes, I could just adjust my query to only retrieve values that are not null/empty/false, but I'm OR'ing multiple form elements in my query, so while one might be populated, the other elements for that record might not be. Is there a simple way, i.e. no VB code, to do such a thing? I appreciate any help/information regarding the topic. Thanks much!
 
More specifically checkboxes... I found you can suppress textfields by the 'can shrink' option, but that option is not available with checkboxes.
 
Multiple check box fields sounds like your table might not be normalized. You could probably use a union query to normalize your table and then use a subreport. The union query would not include any records where the check box was not checked.

I could be wrong about the normalization. Come back with some specifics about your table structure and yes/no fields.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top