I am trying to query an Access table but a lot of the fields are blank!
As so in the case of NMBR_HIG_LICENSED_PRODUCERS column for this record.
How do I correctly test for a blank value? Cause I want to make it 0 if it
is./
number_lic_producers = 0
number_lic_producers = Trim(rst("NMBR_HIG_LICENSED_PRODUCERS"))
but that will still replace my 0 no matter what right?
I tried other ways as well..
'69 Camaro - 28 Apr 2006 15:39 GMT
Hi.
> How do I correctly test for a blank value? Cause I want to make it 0 if it
> is./
Use the Nz( ) function. For example:
number_lic_producers = Nz(rst("NMBR_HIG_LICENSED_PRODUCERS"), 0)
HTH.
Gunny
See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
>I am trying to query an Access table but a lot of the fields are blank!
>
[quoted text clipped - 8 lines]
>
> I tried other ways as well..
DanjoMan - 28 Apr 2006 15:40 GMT
If IsNull(rst("NMBR_HIG_LICENSED_PRODUCERS")) Then
number_lic_producers = 0
Else
number_lic_producers = rst("NMBR_HIG_LICENSED_PRODUCERS")
End If
> I am trying to query an Access table but a lot of the fields are blank!
>
[quoted text clipped - 8 lines]
>
> I tried other ways as well..