473,788 Members | 2,919 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Replacing Null & Populated Fields

natalie99
41 New Member
Hello hello

Can anyone please tell me, can you run something similiar to this replace null value code:

FieldNameNZ: nz([FieldName],"0")

in a way that it will replace any populated field instead of replacing NULL fields?

the data in the populated fields will always be different, and I was hoping to use 0 or No for null and 1 or Yes for populated

Thanks in advance!

Nat :)
Mar 7 '08 #1
1 1521
missinglinq
3,532 Recognized Expert Specialist
If I understand you correctly:

FieldNameNZ: iif(IsNull([FieldName]),"No", "Yes")


Welcome to TheScripts!

Linq ;0)>
Mar 7 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

19
17171
by: Gav | last post by:
Hi, At the moment i am checking that all the fields have been filled out, at the moment i am using the following... if firstname = "" and surname = "" and address1 = "" and town = "" and county = "" and country = "" and postcode = "" and phone = "" and email11 = "" and email2 = "" and password1 = "" and password2 = "" then is there a better more efficient way of doing this??
1
1400
by: anon | last post by:
I am using Visual Basic.NET 2002 and ADO.NET and am a newbie after using VB4/5/6 for ages. I am used to vb6 where we had the isnull() function to check if something was null so that something could be done about it. Example: text1.text=iif(not isnull(rs.fields(0)) , rs.fields(0), 0) Hence: Text1 is given the value of rs.fields(0) if it is not null, otherwise it
6
5562
by: scott | last post by:
i've come across a real head-hurter. I'm looping through a recordset and response.writing it's rows out with no problem except 1 field. The field type is varchar and contains words like meeting, holiday, etc. Problem is, I'm trying to render a "n/a" when the field is null as in LISTING 1 below. My code isn't catching the null values. How can I test for null values? I could swear I've successfully used the Len() test like below...
2
2063
by: thehuby | last post by:
Isn't inserting good data and getting it out of a db a pain in the a$$? I am going to be using the Markdown text to HTML parser (http://daringfireball.net/projects/markdown/dingus) for creating HTML from user input (for a bespoke CMS) so that users can put in their own headings, lists and links etc. This is great and gets round all the issues of apostrophes etc. when inserting informaiton into a database for me.
3
4015
by: JOEP | last post by:
What do I need to do to allow an append query to post null values to records in a field of the destination table? Basically I want to allow records with null values to post to the table. The append query will not work unless there are values in the data i am attempting to send. I want the fields in the destination table to accept null and populated values. Any help here would be gladly accepted. thanks
2
2422
by: tara99 | last post by:
My question is in regard to writing VBA to automate things in MS word. I have a template such as a letter to a business unit or some one which can be used repeatedly. I have few fields in this letter and they have been repeated few times, what I want to do is to is to type those repeated words once only and want them to get populated across the letter. I was thinking about to have few input boxes asking for those specific words, once the...
1
1996
by: jclover | last post by:
I'm using Microsoft Access to try to put together a form that enters data into a table when the form is closed, not a typical live form. Several fields are combo lists that pull from various queries. When I execute the code, I keep getting this error: 1 field(s) set to Null due to type conversion. Here's the code: Dim strSQL As String Dim Eff_Date As Long Eff_Date = Me.Eff_Date
2
2627
by: Coll | last post by:
I have a query that has null values for some of the fields. I'd like those fields to display a zero instead of a blank so I can do totals on them (sum/totalling the field is not working with null values) I created a function as follows... Function zeros(ethfield As Integer) As Integer If IsNull(ethfield) Then zeros = 0 Else
10
9039
by: Toby Gallier | last post by:
Hello! I have a form that is calculating averages as follows: " =(NZ()+Nz()+Nz())/3 " However I need to now adjust for null values , so for example if value2 is null I would then need to base my average on just 2 values instead of 3 i am currently using in my string. How can i have the form update the "3" based on the number of values that are populated?
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10370
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10113
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7519
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4074
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 we have to send another system
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2896
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.