I might be misunderstanding what you are wanting to do, but why can't you just check to see if it is blank? You can use the trim() function to take care of spaces. For example
If trim(d) = "" Then ...
If all you are wanting to do is ensure it is not blank, that should work fine. If you actually need to look up the numbers and letters individualy, You have to use the left() and right() functions. For example if they put "XX1234" you could check with:
if IsNumeric(left(d,2)) = false and IsNumeric(right(d,4)) then...
I don't know if that even applies to what you need but it might come in handy sometime. -Dustin
Rom 8:28