I noticed that if I define a custom object that contains an integer and a double value, when the object is instantiated both of these values are set to 0 (rather than null). So when I populate a textbox on the form with these data items they display 0 rather than being blank.
The problem is that 0 is a number, so I can't tell if the user entered a 0 (zero), or didn't enter anything.
Hmmmmmm. The only way around this that I can think of is to make the values in my object VARIANT data types rather than Long and Double, which seems to me to open up another can of worms having the data type of the object not match the data type within the database. Is there a better way to allow the user to leave a numeric field blank and have NULL stored back into the database? Or is using Variant a common practice?
The problem is that 0 is a number, so I can't tell if the user entered a 0 (zero), or didn't enter anything.
Hmmmmmm. The only way around this that I can think of is to make the values in my object VARIANT data types rather than Long and Double, which seems to me to open up another can of worms having the data type of the object not match the data type within the database. Is there a better way to allow the user to leave a numeric field blank and have NULL stored back into the database? Or is using Variant a common practice?