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

Delete blank columns query

Status
Not open for further replies.

JCAA

MIS
Jun 22, 2003
65
US
I currently have a query with 17 columns, sometimes there are only data in 14, or 15, or 16 columns and the other column(s) are left empty. Is there a way that I can delete empty columns automatically so I can set it up in a macro instead of manually check it each time.

Thanks a bunch!

JCA
 
You would need to write code to identify the blank fields and then modify the sql of the query to remove the fields.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
I'm not really sure why you would want to delete the blank columns...

wouldn't it be easier just to make a query so that the blank columns aren't included?
 
Crowley16, thank you for your answer but I need the columns as they are sometimes filled with values therefor I only need them deleted for those weeks they do not have a value accompanied.

Still looking for help.

Thanks!
 
Sounds a bit un-normalized. I could be wrong.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Or maybe they can be hidden if all the records in the field are null?
 
First of all, are you displaying a query to your users? Do you have any response to the suggestion that your data is not normalized? Could you provide some sample records and how you would expect them to display?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top