Solved

send OleObject to back

Posted on 2011-03-10
5
581 Views
Last Modified: 2013-11-28
hi experts,

Here's my problem: I'm trying to monitor RFC's in combination with a visio workflow diagram.
For this purpose  I created an access-database with RFC's.
On a single form (of a rfc) there is a OleObject which is linked to the workflow diagram.
Over this diagram several buttons are placed. One specific button changes the status of the RFC.
OleObject Properties:
Source Doc is the vsd document
class=Visio.Drawing

When the form opens I use

Me.OLEvisioDocument.Action = acOLECreateLink

(if I don't the drawing doesn't show)

but if the form is opened, it shows the visio drawing with BUTTONS BEHIND THE DRAWING.
How can I get the buttons to the front using vba?

Or is there another way to solve this problem
0
Comment
Question by:corhaveman
  • 2
  • 2
5 Comments
 
LVL 84
ID: 35095575
Do you need to toggle the buttons to show at times, but at other times to NOT show?

If so, then considering that you're using OLE methods, I'd suggest you use a Tab control. Place your OLE container on one page, and your buttons on another, then show/hide the tab pages as needed. Tab pages are given an "index", and you use that to toggle the page. For example, if I have a Tab control named tbMyTab, I'd do this:

tbMyTab = 0 '/shows the first page

tbMyTab = 1 '/shows the second page

OLE containers can do some strange things in Access, so it's best to isolate them in cases like this.

=============================

If not, and if you're looking to "float" the buttons over the OLE container, then I'd suggest you consider other options, like moving the buttons to the top/bottom/side of the OLE container perhaps.
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 240 total points
ID: 35095739
You did not state what version of Access you are using.

Certain types of controls, in certain situations, simply cannot be made to do this.
Keeping this in mind...

A test would be something like this:
Open the form in design View
Select the buttons (Making sure you do not select the OLE object) and use the "Bring to Front" option.
(Or conversely, Select the button and chose "Send to Back")

Just curious, ...
Why not simply put the buttons "beneath" the OLE object, and avoid the issue altogether?

JeffCoachman
0
 

Author Comment

by:corhaveman
ID: 35126822
sorry my reaction took so long

LSMconsulting: i want to see the diagram and the buttons at the same time
boaq2000: access 2007: Bring to FRONT/BACK: is this possible in vba??

I also use a tggle button in the form heading. If i change the value the diagram the buttons appear in front of the daigram. But not just on opening the form.
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 260 total points
ID: 35127150
BringToFront is an option on the rightclick menu. Select the Control, right click and you'll see it in the popup menu (in design view).

As Jeff said: Put the buttons below or to the side. OLE Objects are quirky (at best) in Access, and you'll never get a reliable process out of this.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35129345
FWIW, when a typical OLE object (Bound Object Frame) receives the focus, it will automatically "Move to the front"
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question