PDA

Click to See Complete Forum and Search --> : Invalid use of NULL


angie
Nov 23rd, 2000, 08:36 AM
hi,
I hope someone finds this a simple problem and can provide a quick resolution....

I am creating a recordset from an Oracle DB. Then i am moving that data into labels on a form for viewing only by the user. the problem is when i encounter a field from the DB that is null the error comes up:
Invalid use of NULL - runtime error '94'.

is there a way to let the label just display a blank?

or do i have to ensure that the DB has no nulls in it? that seems kinda extreme to me.

hope you can help!

paulw
Nov 23rd, 2000, 10:31 AM
You should enforce No Nulls in any database anyway since you might understand tri-state logic, but I'll bet your users don't.

use: If IsNull(MyValue) Then MyValue = ""

Cheers,

P.

Stevie
Nov 23rd, 2000, 12:06 PM
You could also place an empty string before the value retrieved from the database.


Label.Caption = "" & rs!SomeField