Condition in macro to check empty\null fields in a table in Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi, i want to check a field in the table is empty\null. i used a conditon
[Reports]![repCSMCFax]![Agency]<>" " but it returns an error when executed
"Type Mismatch"
but the same condtion works on Access 2.0 and not on Access 2003.

So pls if any of you guys out there have any solution out of it pls do share
in.

Thanking you.
 
" " is not an empty string. "" is an empty string. you can also try:

IsNull([Reports]![repCSMCFax]![Agency] OR
IsEmpty([Reports]![repCSMCFax]![Agency])

or what I use in VBA code (but not in a macro)

Len([Reports]![repCSMCFax]![Agency] & vbNullString) = 0
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top