Keep Text box to Front

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In an attempt to color results from a query and then use a button to get
results
I have a button with two different text boxes placed on top of it which are
colored dependant on the result of 2 queries.

When I press the button to execute the query the text boxes disappear

I am looking for a way to have the text boxes remain ontop/ at front of the
button object at all times ...

Can this be done ??

Any help would be appreciated
 
Alan said:
In an attempt to color results from a query and then use a button to get
results
I have a button with two different text boxes placed on top of it which are
colored dependant on the result of 2 queries.

When I press the button to execute the query the text boxes disappear

I am looking for a way to have the text boxes remain ontop/ at front of the
button object at all times ...


When a control gets the fucus it is automatically brought to
the front so you can interact with it. This, of course,
raises the question of how can you click on the button when
it's behind the text boxes? Do you require users to use the
Tab key to get to the button?

In other words, no, what you ask is not feasible. Let's
explore the intent of these text boxes and see if there's
some other way to meet the objective.

I don't understand how you can have two text boxes on top of
the button. Doesn't this mean that one text box is on top
of the other?

If you just want a color indicator based on something in the
query or another control, wouldn't changing the BackColor
of a single text box be sufficient?

I guess I'm really asking for more information before
launching into alternatives.
 
Marsh
Its only a matter of aestetics and I can live without it
I placed the two text boxes on a rectangular button with enough room to
click within its boundaries so that clicking the button calls a query which
displays the combined results of both queries

I have played about with the text boxes On_Click property and it works fine
.... as I say Im just looking to please individuasl who like the look of the
button object

Many Thanks for your help

Regards
 
When you say "On Top Of" do you mean above like a column heading?

What is triggering them to be visible/colored?

Could it be that the form is being refreshed and the coloring is going
away because the tigger for coloring them is not occuring. Whatever the
code for the coloring is, perhaps needs also to be in the OnCurrent
event of the form.

More information is needed. We are having a difficult time visualizing
what is occuring and the sequence of events.

Ron
 
OK, I think understand the objective, but the answer is
still no. The control with the focus, (i.e. the button)
must come to the front. No choices with that.

However, the text box's Click event must also perform your
query process because the user might have the mouse over one
of the text boxes or the button. This implies that the
button's click event can immefiately (re)set the focus to
one of the text boxes, which in turn allows the button to
return to its position behind the text boxes. There will
probably be a brief flash of the button, but I don't think
that's avoidable.

A completely different approach would be to create custom
icons for the button's picture property. Then, istead of
playing with the text boxes, you can change the button's
picture to the icon with the desired colors on it.
 
Back
Top