Solved

send OleObject to back

Posted on 2011-03-10
5
578 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

912 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

21 Experts available now in Live!

Get 1:1 Help Now