Quick one for the experts!!

Mannyluk
04-17-2004, 09:26 AM
Hi,

I'm creating a front end for an Access2000 database.
When i create a recordset and then try to show the contents of the recordset on my form using:

lblHomePhone.Caption = !HomePhone

if the !HomePhone field in the database is blank it throws up an error.
How do i tell vb to ignore the blank field and carry on populating the rest of my form?

Thanks in advance

Mannyluk

TheDutch IceMan
04-17-2004, 09:31 AM
Hi,

I'm creating a front end for an Access2000 database.
When i create a recordset and then try to show the contents of the recordset on my form using:

lblHomePhone.Caption = !HomePhone

if the !HomePhone field in the database is blank it throws up an error.
How do i tell vb to ignore the blank field and carry on populating the rest of my form?

Thanks in advance

Mannyluk


Use this

If IsNull(yourRecordset!HomePhone) = False THen lblHomePhone.Caption = yourRecordset!HomePhone

Mannyluk
04-17-2004, 09:50 AM
Thanks for that!!!

You sir !! are a star!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum