Unbound Object Frame Inside Tab Control

Zurvy

Registered User.
Local time
Today, 01:19
Joined
Dec 26, 2004
Messages
15
Hi all,

I've a weird problem;

On a Tab Control inside a from, I've created an Unbound Object Frame, referring to an MS Excel Work Sheet.

The goal here is to link that Unbound Object Frame residing on the Tab Control and save the form/link.

Now, when I execute the code, the Object Frame is linked and updated, but when I close the form, the link inside the Object Frame is not saved! However, when I do the exact same thing without placing the Object Frame on one of the pages of the tab, so as regular control inside the form, all works fine.

Any ideas what I'm doing wrong?

The code is as follows (performed when I click the button);
"OLETest" refers to the UnBound Object Frame placed inside the first page of a Tab Control inside the form.

----------------

With OLETest
.Enabled = True
.Locked = False
.Class = "Excel.Sheet.12"
.OLETypeAllowed = acOLELinked
.SourceDoc = "Path to Excel File"
.Action = acOLECreateLink
.Enabled = False
.Locked = True
End With

DoCmd.Save acForm, "frmTest"
 
You could place the code in the Form's OnLoad event instead of a button.
 
Thanks for the reply.

I ended up re-designing the form, placing the OLE objects outside the Tab Control.

But is is really strange, as even the "Automatic Update Function" (e.g. ".UpdateOptions = acOLEUpdateAutomatic") does not work on a Tab Control...

Maybe a bug?
 

Users who are viewing this thread

Back
Top Bottom