• How to make ole object cell on the subform in datasheet view show if its empty or not?

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » How to make ole object cell on the subform in datasheet view show if its empty or not?

    Author
    Topic
    #501683

    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.

    Viewing 0 reply threads
    Author
    Replies
    • #1524778

      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.

    Viewing 0 reply threads
    Reply To: How to make ole object cell on the subform in datasheet view show if its empty or not?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: