Text Box Help - Typing in Unbound

  • Thread starter Thread starter dan.cawthorne
  • Start date Start date
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
 
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.
 
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?
 
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?
 
Back
Top