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

Force Zeros into inmatched fields in Append Process

P: n/a
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
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


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.
Nov 12 '05 #2

P: n/a
Thanks:

Of course..its a table.. set the default to zero!

I should have through of that!

Thanks

John

Salad <oi*@vinegar.com> 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.


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.