Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

send OleObject to back

Posted on 2011-03-10
5
Medium Priority
?
610 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 85
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 960 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 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1040 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

886 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