Combo Box

D

Duane

I have a combo box on an sub form cboPDOPID. The row source is SELECT
tbl_Policy_Procedure.PDOPID, tbl_Policy_Procedure.PDOPName FROM
tbl_Policy_Procedure;

It is bound to column 1 which is an AutoNumber field in the table. Columns
are 0;1.2".

I would like to be able to cancel the record if the user starts to enter a
record and then changes there mind. As it is right now, once a value has
been selected and you remove the value, when you try to leave the field I
get an error message stating "You tired to assign a null value to a variable
that is not a Variant type".

Is there a way to do this. I have tried the Undo Command on the Before
Update event of the combo box and the sub form, but I have not gotten it to
work. If I put an Undo Button on my Toolbar that works, but I would like to
automatically undo the record so there is no error message.

Thanks in advance!
 
J

Jeff Boyce

Is there a chance that combobox is bound to a field in the table that
underlies the form? It sounds like you are trying to change a value in a
table using the combobox.

You've described a "how" ... if you'll describe a bit more about why and
what, folks here may be able to offer more specific suggestions.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top