Text Box Help - Typing in Unbound

D

dan.cawthorne

Hello,

Im After some help in creating a Simple Cell Formula using a text
both,

With on my records i have the following particular fields (Bound)
[TenderValue] and [ProfitMarkup] and with on my forms and reports i
have unbound text box called [ActualProfit] now this text field has
the formula =[TenderValue]*[ProfitMarkup] and shows me the actual
profit.

what i want to happen though is some times we might have the Actual
profit so in the [ActualProfit] text box i could type £800

the tender value is £8000 so the [ProfitMarkup] would automaticly Show
10%

code to make this work would be =[ActualProfit]/[TenderValue] but i
have to make [Profitmarkup] unbound

Now what i want be able to do is either type 10% in the Profit Textbox
and show £800 in the ActualProfit text box of £8000

or i have the option of typing £800 in the [ActualProfit] text box and
the [ProfitMarkup] showing 10%

Is this possible?

Regards

Dan
 
D

Dennis

Sure it's possible. Just write some VBA code in the ON EXIT event for the
controls you want to use for calculations. I'd say use the ON CHANGE event,
but that executes the code block for each character typed.
 
D

dan.cawthorne

Sure it's possible. Just write some VBA code in the ON EXIT event for the
controls you want to use for calculations. I'd say use the ON CHANGE event,
but that executes the code block for each character typed.

Im After some help in creating a Simple Cell Formula using a text
both,
With on my records i have the following particular fields (Bound)
[TenderValue] and [ProfitMarkup] and with on my forms and reports i
have unbound text box called [ActualProfit] now this text field has
the formula =[TenderValue]*[ProfitMarkup] and shows me the actual
profit.
what i want to happen though is some times we might have the Actual
profit so in the [ActualProfit] text box i could type £800
the tender value is £8000 so the [ProfitMarkup] would automaticly Show
10%
code to make this work would be =[ActualProfit]/[TenderValue] but i
have to make [Profitmarkup] unbound
Now what i want be able to do is either type 10% in the Profit Textbox
and show £800 in the ActualProfit text box of £8000
or i have the option of typing £800 in the [ActualProfit] text box and
the [ProfitMarkup] showing 10%
Is this possible?

Dan

Well thank you very much dennis, so do you know any VBA code i could
use?
 
D

Dennis

You just write the calculations you need in the event for those fields. I
mean, you already DID that for your example. Just add "Me." in front of each
field and you're home free.

Sure it's possible. Just write some VBA code in the ON EXIT event for the
controls you want to use for calculations. I'd say use the ON CHANGE event,
but that executes the code block for each character typed.

Im After some help in creating a Simple Cell Formula using a text
both,
With on my records i have the following particular fields (Bound)
[TenderValue] and [ProfitMarkup] and with on my forms and reports i
have unbound text box called [ActualProfit] now this text field has
the formula =[TenderValue]*[ProfitMarkup] and shows me the actual
profit.
what i want to happen though is some times we might have the Actual
profit so in the [ActualProfit] text box i could type £800
the tender value is £8000 so the [ProfitMarkup] would automaticly Show
10%
code to make this work would be =[ActualProfit]/[TenderValue] but i
have to make [Profitmarkup] unbound
Now what i want be able to do is either type 10% in the Profit Textbox
and show £800 in the ActualProfit text box of £8000
or i have the option of typing £800 in the [ActualProfit] text box and
the [ProfitMarkup] showing 10%
Is this possible?

Dan

Well thank you very much dennis, so do you know any VBA code i could
use?
 

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