I have a txtbox ontop of a txtbox and I'd like them both to show however it seems that the smaller one is underneath the larger one so it is not displaying. How to I move it on top?
select the txtbox and click on format and bring to front. you may need to change display settings like background style and the like to make sure the bigger txtbox is fully visible under the little one. hope that helps
Thanks but it seems that that is not the problem. Here is my code:
Me.edtComp.Visible = True 'The larger txtbox
Me.edtComp.SetFocus
Me.txtEdit.Visible = True 'The smaller txtbox
When I debug the following happens
When I set the large txtbox to true the smaller one is visible too. As soon as I set the focus though it is no longer visible. Do you know what the problem is and how I can fix it?
What I would like is that when I am in edit mode the bottom corner of the txtbox says Edit Mode. So I put a txtbox on top with transparant borders.
Internally, Access TextBox controls are actually "lightweight" controls--that is, they have trivial functionality. In fact, they don't allow editing! That sounds ridiculous, but what really happens is this: When a TextBox control receives the focus, it builds an identical, full-featured Windows TextBox control on top of it. The Access TextBox is really just a label control with additional properties for formatting and events. It's the Windows TextBox control where you do the real editing.
What's happening, then, is that the Windows TextBox is being built on top of BOTH your controls, hiding them. It looks just like the large Access control, so you don't realize it.
I think you can fix it though. Isn't the editing supposed to occur in the small text box? If you give the small text box the focus, it will build a small Windows text box control, which even though it's on top shouldn't cover the part of the larger text box where you put "Edit Mode". (If my assumption is wrong, perhaps you should consider doing it this way.)
Rick Sprague
Want the best answers? See faq181-2886 To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
Thanks although that is not what I am trying to do. I have a large txtbox and when editing, I would like it to say Edit Mode in the left hand corner. I see that this is not possible so I have put the txtbox underneath.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.