Delete record on form gives Invalid Use of Null error

  • Thread starter Thread starter Jeff Byrd
  • Start date Start date
J

Jeff Byrd

I have a form that I have the OnCurrent event set to set the Record Source
of a combo box to a query based on the data in anohter field. This is done
to only allow the combo box to give them options apprpriate to the data in
the other field.

I have a button programed to delete the record when clicked on. When you
click on it it will give you an error message that says "Invalid use of
Null". It lets you click on OK and them proceeds to delte the record. If I
remove the OnCurrent Event that sets the Record source and then click Delete
there is no Error Message.

What cod can I add to my delete button that will keep this error message
from appearing?

Thank you.
 
Rather than set the recordsource of the combobox in the form's Current
event, set it in the Enter event of the combobox and your error should go
away.
 
Thanks Worked like a charm.

PC Datasheet said:
Rather than set the recordsource of the combobox in the form's Current
event, set it in the Enter event of the combobox and your error should go
away.
 
Back
Top