textbox

  • Thread starter Thread starter DL
  • Start date Start date
D

DL

Hi ,
I have a lot of variables loaded into several textboxes. I would like to
make some calculations when somebody focuses on a box but I do not want to
put al the variables in a unique peace of code.
Is it possible to give a command so that you know what object(?) is
currently selected.

example:
box with label "price" is selected.
when this box has lost its focus it should do price*amount. But I don't want
the label price in the formula.
because this same forumla should be used for price1, price2, price 3 etc.

does anybody understand what I'm talking about?
And can that person please give me a hint?

Thnx.
 
ActiveForm and ActiveControl refer to the currently-active form and control.
How do you anticipate causing the code to execute? If it is from the
AfterUpdate event of specific Text Boxes, you can pass the name of the
TextBox in the call to the Function.

Somehow, of course, you are going to have to refer to the exact variables or
controls that hold the information you want to calculate.

Larry Linson
Microsoft Access MVP
 
Back
Top