disable text boxes or make zero

K

Kirt84

Hello

On a Form I want to able to disable or make a text box (txtlabel2) say ‘0’
if another text box says ‘N/A’. Either way I want to be able to have a ‘0’ or
disable the text box (txtlabel2) but i prefer to have a ‘0’ in the text box.
Also can this be put into a Report??? Please help!
 
B

Brendan Reynolds

In the ControlSource property of the textbox ...

=IIf([NameOfOtherTextBox]="N/A", "0", "X")

Change "X" to whatever you want the ControlSource to be if the value of the
other textbox is *not* "N/A".

Here's a link to the on-line help topic on the ControlSource property ...

http://msdn.microsoft.com/library/d...baac11/html/acproControlSource_HV05187095.asp

And here's a link to the topic describing the IIf Function ...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vafctiif.asp
 

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