jdspinelli
Programmer
Good Morning:
I have a bound form for editing data. An unbound combo box is available for the user to choose a record. The intent is for the user to select from the combo box values and immediately move to the record in the underlying table. I have accomplished this using the Change event for the combo. However, if the user deletes the entry in the combo, I receive the "invalid use of null" error which locks up Access and I must close down. Using the Nz function to prevent the error does not trap the error in the change event. I can use a separate "Select Record" command button that works well. However, is there a way to 1) trap the "invalid use of null" error, and 2) place processing in an event procedure (to move to the requested record) for the combo box without leaving the combo box control?
Thanks,
jdspinelli
I have a bound form for editing data. An unbound combo box is available for the user to choose a record. The intent is for the user to select from the combo box values and immediately move to the record in the underlying table. I have accomplished this using the Change event for the combo. However, if the user deletes the entry in the combo, I receive the "invalid use of null" error which locks up Access and I must close down. Using the Nz function to prevent the error does not trap the error in the change event. I can use a separate "Select Record" command button that works well. However, is there a way to 1) trap the "invalid use of null" error, and 2) place processing in an event procedure (to move to the requested record) for the combo box without leaving the combo box control?
Thanks,
jdspinelli