textbox

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.
 
L

Larry Linson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top