dancerjodi: (Default)
[personal profile] dancerjodi
I'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! :)

Date: 2007-03-14 02:02 pm (UTC)
From: [identity profile] sajuka.livejournal.com
Did you find this page?

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)
From: [identity profile] dancer.livejournal.com
"Did you find this page? 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."

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)
From: [identity profile] sajuka.livejournal.com
Hm... Just to get it straight in my mind, all 4 rows should be there, but you want to eliminate the empty columns?

Re: MS Access

Date: 2007-03-14 02:34 pm (UTC)
From: [identity profile] dancer.livejournal.com
"Hm... Just to get it straight in my mind, all 4 rows should be there, but you want to eliminate the empty columns?"

Yep :)

Using MS Access - not the most versatile of tools . . .

ColumnHidden Property

Date: 2007-03-14 03:25 pm (UTC)
From: [identity profile] sajuka.livejournal.com
After a little digging, I found this page:

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)
From: [identity profile] dancer.livejournal.com
THANK YOU! You huge geek! :) (I mean that in the nicest way possible).

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)
From: [identity profile] sajuka.livejournal.com
THANK YOU! You huge geek! :) (I mean that in the nicest way possible).

And I'll take it in the nicest way possible :) You're very welcome.

Profile

dancerjodi: (Default)
dancerjodi

December 2023

S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 2nd, 2026 11:15 pm
Powered by Dreamwidth Studios