Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Implementing IIf or Nz

5 views
Skip to first unread message

FredBear

unread,
Jun 8, 2007, 12:18:49 PM6/8/07
to
Anybody know a useful workaround to implement the IIF or Nz functions from
MS Access in Delphi 6.

I want to combine two numeric fields into one but it doesn't work if one of
the fields is Null.

e.g. Debit + Credit = Values

--


(\__/)
(='.'=)
(")_(")


Erik

unread,
Jun 8, 2007, 12:31:05 PM6/8/07
to

FredBear wrote:

> Anybody know a useful workaround to implement the IIF or Nz functions from
> MS Access in Delphi 6.
>
> I want to combine two numeric fields into one but it doesn't work if one of
> the fields is Null.
>
> e.g. Debit + Credit = Values
>

If this is a situation similar to the damn BDE returning
NULL if a field is blank, then resulting in a
"Cannot convert type NULL to integer" crap thing, I had
to write my own value function to test for NULL and assign
zero or an empty string if necessary.

FredBear

unread,
Jun 8, 2007, 1:03:54 PM6/8/07
to

"Erik" <eri...@peregrindotnet.net> wrote in message
news:136j12g...@corp.supernews.com...

That's exactly it and I was hoping someone was going to reply with an easy
answer but I think I will have to roll my own.

0 new messages