D
Dave Ruhl
Hi, I have a combo box with 'Limit to List' set
to 'YES'. This is a list of customer names, and there is
a button on the form to add a new customer if not already
on the list (it opens another form)
This combo box is in a continuous-forms subform, whic is
used to add customers to a mailing list. When users try
to enter invalid data they get the standard "This item is
not in the list...blah, blah, blah" message. Many of our
users then use the backspace key to delete what they have
entered, and then try to click the 'Add New Customer'
button.
The problem is that they have added a blank record with a
null value in a required field, and when they try to
leave that field they get the "You tried to assign a Null
value to a field that is not variant type..." error
message. Simply hitting the ESC key a few times, or CTRL-
Z will delete the added record, but I can't figure out
how to trap this error and either A) delete the null
record for them or B) show them a message telling them to
hit ESC a few times.
I've tried to use the 'On Not in List', 'On Dirty', 'On
Change', and 'On Lost Focus' events to trap this error
with no luck. Can this be done ? Thanks...
Dave
to 'YES'. This is a list of customer names, and there is
a button on the form to add a new customer if not already
on the list (it opens another form)
This combo box is in a continuous-forms subform, whic is
used to add customers to a mailing list. When users try
to enter invalid data they get the standard "This item is
not in the list...blah, blah, blah" message. Many of our
users then use the backspace key to delete what they have
entered, and then try to click the 'Add New Customer'
button.
The problem is that they have added a blank record with a
null value in a required field, and when they try to
leave that field they get the "You tried to assign a Null
value to a field that is not variant type..." error
message. Simply hitting the ESC key a few times, or CTRL-
Z will delete the added record, but I can't figure out
how to trap this error and either A) delete the null
record for them or B) show them a message telling them to
hit ESC a few times.
I've tried to use the 'On Not in List', 'On Dirty', 'On
Change', and 'On Lost Focus' events to trap this error
with no luck. Can this be done ? Thanks...
Dave