Results 1 to 2 of 2
2015-08-18, 02:13 #1
- Join Date
- Aug 2015
- Thanked 0 Times in 0 Posts
How to make ole object cell on the subform in datasheet view show if its empty or not?
I have form and a sub form on my ms access which is connected to a sql server (2008 r2).
There's a column called Image (for adding images) in the sub form which is OLE Object type.
My problem is that the image column always shows "OLE object" even if its empty or not.
I want to make it show "Available" if there's a picture in it and if its empty it should show "empty".
I tried going through the property of the image column, may be someone could point me to the right direction of doing this.
2015-08-24, 13:44 #2
- Join Date
- Mar 2010
- Winston-Salem, NC USA
- Thanked 4 Times in 4 Posts
This may be one of those deals where you have to hide the image column and programmatically add a text column next to it and based upon the evaluation of the cell value of the image, insert whatever text you want in the new column. Does this make any sense?
I'm not sure how you're querying for the data but you could possibly do a Case Select to get whatever you need for that column.
Example: SELECT CASE [ColumnName] WHEN NULL THEN 'Empty' ELSE 'Available' END AS SomeName FROM YourTable
This assumes the column value is Nullable.
Last edited by Bender; 2015-08-24 at 13:53. Reason: fixed SQL SyntaxDo your part!!! Report SPAM to http://www.spamcop.net/