Hi:
I have a situation where I am appending records to a table, and some of the records do NOT
have all the fields in them that the table has. In those cases, the field is filled with a
null but the normal append process. Does anyone know of an easy way to force the use of a
0 (zero) rather than a null when fields don't match on an append? It would make life much
easier down the line where I haver to do summing and things, and sometimes null doesn't
behave exactly the same as a zero!
Thanks
John Baker 2 2211
John Baker wrote: Hi:
I have a situation where I am appending records to a table, and some of the records do NOT have all the fields in them that the table has. In those cases, the field is filled with a null but the normal append process. Does anyone know of an easy way to force the use of a 0 (zero) rather than a null when fields don't match on an append? It would make life much easier down the line where I haver to do summing and things, and sometimes null doesn't behave exactly the same as a zero!
Thanks
John Baker
Use an expression
IIF(Nz([Field],0) > 0,[Field],0)
Of course, you could set the DefaultValue to zero in the table...or else in the form.
Thanks:
Of course..its a table.. set the default to zero!
I should have through of that!
Thanks
John
Salad <oi*@vinegar.co m> wrote:
John Baker wrote:
Hi:
I have a situation where I am appending records to a table, and some of the records do NOT have all the fields in them that the table has. In those cases, the field is filled with a null but the normal append process. Does anyone know of an easy way to force the use of a 0 (zero) rather than a null when fields don't match on an append? It would make life much easier down the line where I haver to do summing and things, and sometimes null doesn't behave exactly the same as a zero!
Thanks
John Baker
Use an expression IIF(Nz([Field],0) > 0,[Field],0)
Of course, you could set the DefaultValue to zero in the table...or else in the form. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: TheTeapot |
last post by:
Hi all,
Here's a puzzle:
// Say I have an array of numbers set up like so:
$arr = array(15,16,17,100,121,1000);
// How can I create a function so that I can use it like so:
addleadingzeros_arr($arr);
// and have the output look like:
|
by: mmmgood1 |
last post by:
Help, I'm linking an excel spreadsheet in access and I have datafields
with leading zeros (01021). When the file is linked in access, I get
a #num in the field with the leading zeros. The zeros are needed.
I've formated the field to be a text field, general number, and number
and still I get the #num! error, or the leading zero is dropped. Can
someone help before I pull more of my hair.
Thanks a bunch.
|
by: Melissa |
last post by:
I have a frontend file named CustomerApp and backend file named CustomerData.
CustomerApp is at C:\Customer Database and CustomerData is at S:\Customer
Database. Could someone help me with the code to do the following:
1. Create a new table named TblCustomerContact in CustomerData
2. Add a field named CustomerContactID (autonumber) in TblCustomerContact
3. Add a field named CustomerID (Number-Long) in TblCustomerContact
4. Add a field...
|
by: tpcolson |
last post by:
I have a fairly large access 2003 table (200,000) records. Field 'X' is
a text field, and contains either no value, 4 digits, 5 digits, or 6
digits. What I need to do is to add two zeros to the left of the
records with 4 digits in field 'X', 1 zero to the left of the records
with 5 digits in field 'X', and 6 digits for nulls. IE, record 1 field
'X' contains 1234, after this magic, it would contain 001234. Bear in
mind, I have ABSOLUTLY...
|
by: TN Bella |
last post by:
I have a simple text box called txtrefnum, if the user enters a number
length less than 9 characters long than I need to have lead zeros
added to it. Does anyone know how to do this? I couldn't find anything
online on the subject...
<asp:TextBox id="txtRefNum" runat="server"></asp:TextBox>
I thought I could use a validator for the process and make the user
add the zeros, but of course that is a big no-no! Please help!!
| |
by: MLH |
last post by:
What might a FN look like to put the following lines in if such
FN accepted an array of desired fieldnames and fieldtypes?
I would like to have the functional lines that follow in a FN
that accepted an array of data that looked like this:
"VehicleJobID", dbLong
"WannaBill", dbBoolean
10 If TableOrQueryExists("", "TempTable") Then DoCmd.DeleteObject
acTable, "TempTable"
|
by: Chester |
last post by:
I'm working on an app that records data collected by service
technicians (VB.Net front-end, SQL Server 2000 back end). The
technicians need to record numbers with varying scale and precision.
For example, they may record one reading as 63.45 and the next as 123.1
and a third as 1.32456.
That's fine - those can be saved as floating point numbers (very
little math is done with these numbers so I'm not too worried about
strange floating...
|
by: travellinman |
last post by:
Hi, I'm trying to combine the text in two original fields and paste them into another 3rd field on a form, but the problem is that there are leading zeros in both original fields, which access does not copy into the 3rd field.
For example, if field 1 = 07 and field 2 = 0001, i'd like the 3rd field to be 070001, but instead access returns 71 in the 3rd field.
Adding to the complexity a bit is that field 2 is an autonumber field. so when i...
|
by: JimmyKoolPantz |
last post by:
Task: Customer wants a script of the data that was processed in a
"CSV" file.
Problem: Zip-Code leading zeros are dropped
Basically we have a client that has requested a custom script for each
file that he has us process. He wants this in a Comma Delimited
Format.
|
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...
|
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...
| |
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...
|
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,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |