473,473 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Text Box Control Source problems.

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
4 2294
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Cro | last post by:
Hello Access Developers, I'd like to know if it is possible to perform a count in an expression that defines a control source. My report is based on a query. In my report, I want a text box to...
4
by: VivN | last post by:
I want to use an expression as the control source for a text box in a report (Access 2000). Whilst I have sucessfully used these simple ones =TimeToSingle(TotalHours(,))...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
1
by: J.Marsch | last post by:
Hello all: I am trying to create a multi-project solution in VS 2005, and I'm having some problems with Source Control. I am running into 2 very vexing problems. Can anyone give me a pointer?...
6
by: @sh | last post by:
I know this is probably a real simple one, but I'm obviously missing something.. I'm building a function that I'll use throughout a website in the situation that I have two text boxes - the two...
3
by: ChasW | last post by:
This should be most simple to do, and I am doing it elsewhere in the very same form, but for some reason it is not working in this case. My form uses a query as its Record Source. In the form...
2
by: vsteshenko | last post by:
Hello, This is my first post so I hope I'm doing this correctly. I am currently working on creating an order form for sales associates at my work to be used at conventions. I have a form with...
0
by: ChopStickr | last post by:
I have a custom control that is embedded (using the object tag) in an html document. The control takes a path to a local client ini file. Reads the file. Executes the program specified in...
3
by: ºa¤Ö | last post by:
We are developing ASP.NET web application and using Visual source safe (VSS) to control our source code We developed a user control and it will been used by different project. I know there have...
10
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= | last post by:
Hi, i have text like this: "ACPI\GENUINEINTEL_-_X86_FAMILY_6_MODEL_13\_0" an after displaying it in a RichTextBox as RTF string, i get this: "ACPI_-_x86_Family_6_Model_13 "
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.