ALCON,
I am generating an application in Access and I am checking for the presence of data within a field on a form. If no data, flag it as an error. In my trusty Access 2007 Bible, for a String variable, the minimum value is 0 (zero) characters. However, if they try to generate a new record, I get a Run-Time '94' error, "Invalid use of Null".
The line of code that generates the error is as follows:
dim secitemdesc as string 'this is the variable declaration
secitemdesc = Me.SECOND_ITEM_SUPPORT_DESC.Value 'error here
I guess that 0 characters is not the same as a Null value for VBA, correct?
Is the best way around this to set the table up so new records give this Control (SECOND_ITEM_SUPPORT_DESC) a default value?
Or is there a different way to deal with null values and variables in VBA?
Any assistance would be greatly appreciated, thank you.
DH
