Null Value Causing Error

  • Thread starter Thread starter mj
  • Start date Start date
M

mj

Hi. I have a combo box that autopopulates form controls.
When there's a Null value in any of the combo box fields
that updates a form control, it causes an error. This
seems to only happen when the form control is a number,
like for a person's ID number. I was hoping to just have
the form control be a Null value if that's what the combo
box is but I can't figure it out. For now, I'm just using
an IF statement to put a zero in place of Nulls. If anyone
has a better suggestion, I'd be grateful to hear it.
Thanks!
 
You may find the Nz function easier than the If statement.

The error may be resulting from the restrictions on the field that the
textbox is bound to. Will the field accept a Null value? Are there any calls
or variable data types in the code that don't accept Null values?
 
Wayne, thanks for the suggestion. The table control was a
lookup with a limit to list. That was the hangup. Thanks!
 
Back
Top