Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004

    Unanswered: How to test for an Ole Class?

    Hi Folks,

    I've an OLE field (embedded) in one of my tables. I've set it up on a form where if you double click on the field, a template word document is inserted into that field, and the word template then opens for the user to fill.

    What I need to do is test the OLE field to see if it already has an existing word document inserted. If it has then I don't want to insert the template, I just want it to open the existing embedded word document.

    I've tried testing for the class, such as:

    If Course_Desc_Text.class = "word.document"
    But that doesn't work. If tried test the value of the OLE object and noticed that if an OLE object is present the value is similiar to something like "|¬", but I can't seem to use this and get it work.

    Anyone know I can test the class of an OLE object or even (better) to test if any OLE object is present in the field?

    Using Office 2002

    Thanks in Advance


  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Check for null.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Feb 2004
    Thanks for the reply Teddy. I should have stated that I had already checked for null. It didn't work. You get an "Object required" error.

    I've sorted it now.

    I did it by testing for OLEType. I noticed if there was an object, this value is 1, if there isn't the value is 3. So it was easy after that.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts