Unbound TextBox value

JPR

Registered User.
Local time
Today, 15:23
Joined
Jan 23, 2009
Messages
202
Hello,

I have a form on which I have added an unbound textbox (txtResult) which I would like to return a given value depending if data is entered or not in another textbox (txt3).

Currently, txtResult shows a value between txt1 and txt2 (which is located in a subform.

txtResult has the following control source code:
Code:Copy to clipboard
[txtAmount1]-Forms!Form1!Subpartial!txtAmount2

Is it possible that txtResult shows by default, the formula which I have indicated in the Control Source and the value 0 (zero), if txt3 has data?

Thank you
 
No. Honestly I wouldn’t know how to write the code. Thanks
 
No. Honestly I wouldn’t know how to write the code. Thanks
Might want to try something else to learn then? :(
This is very basic VBA. and you will need to write a lot more, so may as well start learning now?

I just tested thisin a form of mine. I am not giving you the EXACT code, but the logic.

Up to you to change the names to suit?

Code:
=Iif(Len([text3] & "") > 0,0,[text1]-[text2])
 
Thanks you. I will on the code.
 

Users who are viewing this thread

Back
Top Bottom