MS Access question
Mar. 14th, 2007 09:53 amI'm creating a report to show why a discharge from the hospital was delayed, and there are 15 or so potential reasons it could have happened. Does anyone know a way (either through a query or report) I can just exclude a variable altogether from the results if its null? Poking around a bit last week I couldn't find anything. I could easily just manually delete columns I don't need after the fact, but I'm trying to come up with something that's a bit less manual. I'm not sure if there's some kind of VB thing I can do in my query that I'm unaware of.
Thanks in advance! :)
Thanks in advance! :)
no subject
Date: 2007-03-14 02:02 pm (UTC)http://articles.techrepublic.com.com/5100-10877-6125114.html
#4 and #5 seem like they might be what you're looking for... But it's been a long time since I used Access, so I'm not entirely sure how you're structuring your query.
MS Access
Date: 2007-03-14 02:16 pm (UTC)#4 and #5 seem like they might be what you're looking for... But it's been a long time since I used Access, so I'm not entirely sure how you're structuring your query."
That's around selecting data within a variable. I'm trying to find if there is a way to not bring in the variable at all entirely, if its null. Otherwise I end up with 4 rows of data, 30 or so columns (and most of those columns don't have any results in them. Excluding a value is simple enough, excluding an entire variable - I'm not even sure if its possible. Essentially I want to say "show me the number of delays due to discharge planning, but if there weren't any delays resulting from discharge planning just don't bring that column in all together").
I'm not sure why I try and do these things sometimes. I just figure, there has got to be a way! :)
Re: MS Access
Date: 2007-03-14 02:32 pm (UTC)Re: MS Access
Date: 2007-03-14 02:34 pm (UTC)Yep :)
Using MS Access - not the most versatile of tools . . .
ColumnHidden Property
Date: 2007-03-14 03:25 pm (UTC)http://msdn2.microsoft.com/en-us/library/aa194141(office.10).aspx
which says there is a "ColumnHidden" property which applies to Column objects, and is accessible via VB.
Doing a lot of digging in that MSDN library, I find hints that it is possible to setup VB to run a query, grab the results, check for empty columns, and then hide the empty columns. Unfortunately the reference has a lot of holes in it, so without having Access in front of me, I'm not sure I can give you very helpful code hints...
Re: ColumnHidden Property
Date: 2007-03-14 03:27 pm (UTC)I'm heading to some meetings, but I'll give it a try this afternoon and I'll let you know what I find.
Re: ColumnHidden Property
Date: 2007-03-14 04:13 pm (UTC)And I'll take it in the nicest way possible :) You're very welcome.