My Assistant
![]() ![]() |
|
|
Mar 24 2009, 05:05 PM
Post
#1
|
|
|
UtterAccess VIP Posts: 9,266 From: Wisconsin |
I'm trying to cascade-stack a series of textbox controls on my form (kind of like cards in solitaire), and their front-to-back order can change from time to time. I tried the .BringToFront action, but I get:
Run-time error '438': Object doesn't support this property or method When I hit F1 while selecting the action, it referred to Excel objects, not Access. Is there a different action that I'd use for an Access form control? Basically, I want to loop through the controls, bringing each one to the front as I loop. That way the last textbox in the loop appears on top of the others. Dennis |
|
|
|
Mar 24 2009, 05:10 PM
Post
#2
|
|
|
Retired Moderator Posts: 37,716 From: The San Francisco Bay Area |
Dennis -
How about using the controls Visible property to show the control you want? Just a thought... Jack |
|
|
|
Mar 24 2009, 05:18 PM
Post
#3
|
|
|
UtterAccess VIP Posts: 2,135 From: Plano, TX |
SetFocus will bring a control to the front, maybe loop through your controls in order, setting the focus to each one.
HTH |
|
|
|
Mar 24 2009, 05:47 PM
Post
#4
|
|
|
Utterly Banned Posts: 7,038 |
Actually, why not just do what Jack said. Make everything else's VISIBLE property NO. That's how I've always done it and it takes no more code than looping through and doing other stuff.
|
|
|
|
Mar 25 2009, 08:44 AM
Post
#5
|
|
|
UtterAccess VIP Posts: 9,266 From: Wisconsin |
Well, what I'm trying to do is show the entire stack, so making controls invisible would make the stack appear to be a single control. The idea is to have the controls that are underneath still partially visible, like when you select Windows->Arrange->Cascade in Excel.
Dennis |
|
|
|
Mar 25 2009, 10:25 AM
Post
#6
|
|
|
Utterly Banned Posts: 7,038 |
Well, good luck in trying but I think that, in order to change the order, you would need to open the form in design view for that (even programmatically). I don't think the bring to front will work unless you are in design view.
|
|
|
|
Mar 25 2009, 12:17 PM
Post
#7
|
|
|
UtterAccess VIP Posts: 9,266 From: Wisconsin |
Yeah, that seems to be the case. Ah, well. It was mostly a "let's see if we can spice up the interface" sort of idea.
Dennis |
|
|
|
Mar 25 2009, 12:24 PM
Post
#8
|
|
|
UtterAccess Guru Posts: 516 From: N. Colorado |
This may be WAY off the mark but what about a frame control with an image of the edges of stacked controls that sits behind whatever control is visible at the time?
In essdece the "stacked edges" visible are just an image with a real stached collection of controls on top of it. This stack of controls is precision placed so their eddges do not in fact show. Then you show only 1 control at a time and it appears to be on top of a stack? Totally off the cuff here. never tested. Namaste |
|
|
|
Mar 25 2009, 02:13 PM
Post
#9
|
|
|
UtterAccess VIP Posts: 9,266 From: Wisconsin |
Kurt,
Thanks for the suggestion... I was hoping to see a bit of each textbox - again, like when you play solitaire you can see a bit of each card - just enough to let you know what the rest of the card looks like. If I decide to continue to attack this later on, I may pre-stack some unbound textboxes, and assign the values to them with VBA. Then, if the stack order needs to be changed, I'll reassign the text values rather than try to re-order the textboxes. Dennis |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th May 2013 - 12:37 AM |