Blankdata

Tadele

New member
Local time
Today, 21:57
Joined
May 11, 2011
Messages
6
Dear All,
Howcould i replace blanks to zero
 
What format is the field set to? The more info you give us the better we can help you
 
The data type is numeric single
 
Update query something like:
Code:
Update TableNameHere Set FieldNameHere = 0 Where Len([FieldNameHere] & "") = 0
 
Update query something like:
Code:
Update TableNameHere Set FieldNameHere = 0 Where Len([FieldNameHere] & "") = 0

Bob!
I will ask one question? What is the meaning of & "" in the above statement?
 
Bob!
I will ask one question? What is the meaning of & "" in the above statement?

If you don't add that and the field is null then it will error out. If you use the Len(FieldName & "") = 0 then it takes into account both nulls and zero-length strings. In this case, since it is a single, it could probably get by with just

FieldName Is Null

as you can't put an empty string into a number field. But it won't hurt if you use it and if used that way all of the time it is a consistent way of doing it so you don't have to worry about what to choose to write for which data type.
 
Great!
I used this many time and the nz function too, but if you see &"", logically it something looks meaningless :) anyhow thanks for clarification.
 

Users who are viewing this thread

Back
Top Bottom