Connecting Tech Pros Worldwide Forums | Help | Site Map

Display null in Forms when a value is zero

Newbie
 
Join Date: Jun 2009
Posts: 6
#1: Oct 13 '09
In my Form I have a text box, and I have setup Control Source as follows:
=IIf([fieldA]=0,Null,[fieldA])
But I get an error with "This control has a reference to itself".
Can anyone advise how else can I achieve what I want ?
best answer - posted by NeoPa
Is the control you have this formula in called [fieldA] by any chance? If so, then Access cannot tell which of the [fieldA]s you want to reference.

NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,730
#2: Oct 13 '09

re: Display null in Forms when a value is zero


Is the control you have this formula in called [fieldA] by any chance? If so, then Access cannot tell which of the [fieldA]s you want to reference.
Newbie
 
Join Date: Jun 2009
Posts: 6
#3: Oct 13 '09

re: Display null in Forms when a value is zero


Yes NeoPa : I renamed it, and all is well : Many thanks for your prompt help.
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,730
#4: Oct 13 '09

re: Display null in Forms when a value is zero


Good news. Well done.

Welcome to Bytes!
Reply