Undo a combo box selection

O

oldblindpew

I am using a combo box to pick a value for a foreign key. The foreign key
field (long integer type) starts out empty, and then is populated via the
combo box. Later, wanting to reverse the selection and depopulate the field,
I select and delete the contents of the combo box. When I move off the combo
box Access says:

"You tried to assign the Null value to a variable that is not a Variant data
type."

How do I empty this field?

Pew
 
J

Jeanette Cunningham

Try undoing the record, or you may need to delete that record.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
O

oldblindpew

It does not seem practical to delete the entire record just to clear one field.
 
O

oldblindpew

I think I've fixed this problem. I don't really understand it, but I
discovered I had included an extra table in my subform's Record Source. I
deleted this table, and now I can freely use my combo box to choose a foreign
key value, or change my mind and delete the value without resulting in any
cryptic messages about trying to assign the Null value to a variable that is
not a Variant type.
 

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