By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,124 Members | 2,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,124 IT Pros & Developers. It's quick & easy.

Text Box Control Source problems.

P: n/a
I built a form that pulls several fields from a query. In some
instances the [Contract#] field is empty and nothing displays in the
form text box. In this case I want a simple statement like "Item Not
Loaded". [Contract#] is a text data type.

I tried this and it didn't work:
IIf([Contract#] Is Null,"Item Not Loaded",[Contract#])
Someone suggested its not really Null, but blank so I should try this:
=IIf(CLng(Nz([Contract#],0)),[Contract#],"Not Loaded On AS400")
And
=IIf(CLng(Nz([Contract#],0)),"Not Loaded On AS400",[Contract#])
Also didn't work.
Any suggestions.
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 18 Feb 2004 14:12:00 -0800, neptune wrote:
I built a form that pulls several fields from a query. In some
instances the [Contract#] field is empty and nothing displays in the
form text box. In this case I want a simple statement like "Item Not
Loaded". [Contract#] is a text data type.

I tried this and it didn't work:
IIf([Contract#] Is Null,"Item Not Loaded",[Contract#])
Someone suggested its not really Null, but blank so I should try this:
=IIf(CLng(Nz([Contract#],0)),[Contract#],"Not Loaded On AS400")
And
=IIf(CLng(Nz([Contract#],0)),"Not Loaded On AS400",[Contract#])
Also didn't work.
Any suggestions.


Did you try:
=IIf(IsNull([Contract#]),"Item Not Loaded",[Contract#])
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 12 '05 #2

P: n/a
On 18 Feb 2004 14:12:00 -0800, neptune wrote:
I built a form that pulls several fields from a query. In some
instances the [Contract#] field is empty and nothing displays in the
form text box. In this case I want a simple statement like "Item Not
Loaded". [Contract#] is a text data type.

I tried this and it didn't work:
IIf([Contract#] Is Null,"Item Not Loaded",[Contract#])
Someone suggested its not really Null, but blank so I should try this:
=IIf(CLng(Nz([Contract#],0)),[Contract#],"Not Loaded On AS400")
And
=IIf(CLng(Nz([Contract#],0)),"Not Loaded On AS400",[Contract#])
Also didn't work.
Any suggestions.


It may think you are trying to set it to the field named "Not Loaded On
AS400" - which dosen't exist. I think it may only be possible to do this
with an unbound control that refers not to the field names, but the form
control name that holds Contract#. In effect a calculated control.

--
Mike Storr
www.veraccess.com
Nov 12 '05 #3

P: n/a
Did you try

[Contract#]=""

The double quotes indicating that it's a zero length, rather than null
value?

"neptune" <bs**********@hotmail.com> wrote in message
news:c5**************************@posting.google.c om...
I built a form that pulls several fields from a query. In some
instances the [Contract#] field is empty and nothing displays in the
form text box. In this case I want a simple statement like "Item Not
Loaded". [Contract#] is a text data type.

I tried this and it didn't work:
IIf([Contract#] Is Null,"Item Not Loaded",[Contract#])
Someone suggested its not really Null, but blank so I should try this:
=IIf(CLng(Nz([Contract#],0)),[Contract#],"Not Loaded On AS400")
And
=IIf(CLng(Nz([Contract#],0)),"Not Loaded On AS400",[Contract#])
Also didn't work.
Any suggestions.

Nov 12 '05 #4

P: n/a
Have you tried using double quotes instead of null? Like saying
[Contract#]=""?

"neptune" <bs**********@hotmail.com> wrote in message
news:c5**************************@posting.google.c om...
I built a form that pulls several fields from a query. In some
instances the [Contract#] field is empty and nothing displays in the
form text box. In this case I want a simple statement like "Item Not
Loaded". [Contract#] is a text data type.

I tried this and it didn't work:
IIf([Contract#] Is Null,"Item Not Loaded",[Contract#])
Someone suggested its not really Null, but blank so I should try this:
=IIf(CLng(Nz([Contract#],0)),[Contract#],"Not Loaded On AS400")
And
=IIf(CLng(Nz([Contract#],0)),"Not Loaded On AS400",[Contract#])
Also didn't work.
Any suggestions.

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.