Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

logical test on access form

Status
Not open for further replies.

etcrier

Programmer
Sep 20, 2006
60
US
i have several contastand fields "descriptions" on a from

"COLOR"
"EXPANSION"
" ADDITITIVE"
etc etc

each constant above should only display if a corresponding field is not empty for example

if(exp) >0 display "EXPANSION"
if(color) >0 display "COLOR"
etc etc

i do not know the format for the above expression in the "build event" for the text label filed or a static text field". I can do the if part which is "=exp >0 ???????

i am not a VB programmer, but an old "c" coder


thanks
 
the control of the field should be
=iif(exp >0, "EXPANSION",iif(color>0, "COLOR",""))
 
Thanks, But

I put the code into
text field --then i clicked properties- event tab-- and put your code into
before update, after update, on got focus, on enter
and the field is empty when exp =10 or 0

not sure which event property to put code into, it seems i tried them all and i get nothing

this form does no data entry. it is a work order that I display then user clicks on a print button.

thanks
 
sorry if this is for 2 fields it shoul read
=iif(exp >0, "EXPANSION","")
=iif(color>0, "COLOR","")

this should be the control source of the text boxes
 
Thanks
it worked GREAT

for an ol C programmer I am having a real tough time doing this VB stuff in access.

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top