Solved

send OleObject to back

Posted on 2011-03-10
5
574 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
FWIW, when a typical OLE object (Bound Object Frame) receives the focus, it will automatically "Move to the front"
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
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…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now