checking for blank values

A

Alylia

I have been having problems checking for blank values on fields with
date/time and currency datatypes.

Example, I have tried the syntax statring with the following and they have
not worked out
If txtDate = ""
if txtDate is null
if txtAmount = ""
if txtAmount is null

Please help.
 
B

Bruce Rusk

Alylia said:
I have been having problems checking for blank values on fields with
date/time and currency datatypes.

Example, I have tried the syntax statring with the following and they have
not worked out
If txtDate = ""
if txtDate is null
if txtAmount = ""
if txtAmount is null

Please help.

You can try (overkill but effective):

if LenB(Cstr(Nz(txtDate,vbNullString))) = 0
 
A

Alylia

Thanks for your prompt response but can you further elaborate because I did
not quite get it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top