Discussion:
ComboBox should be empty for new records
(too old to reply)
o***@googlemail.com
2007-10-27 09:33:26 UTC
Permalink
Hi,

already searched in the groups for an answer, but couldnt find :-(

I have an unbound combobox which looks up values (names) in a table
and creates a new record in the form with some data from this table
(Event After Update).

Problem:
The comboBox shows the last selected row. I want the combobox always
to be empty when the user creates a new record.
Otherwise the user might think that the name in the box is already
selected and the AfterUpdate Procedure wont be executed.

Maybe there is an easy (vba) solution, but unfortunately I couldnt
find it.

Thanks for your help!

Andreas
Minton M
2007-12-21 18:59:39 UTC
Permalink
Post by o***@googlemail.com
Hi,
already searched in the groups for an answer, but couldnt find :-(
I have an unbound combobox which looks up values (names) in a table
and creates a new record in the form with some data from this table
(Event After Update).
The comboBox shows the last selected row. I want the combobox always
to be empty when the user creates a new record.
Otherwise the user might think that the name in the box is already
selected and the AfterUpdate Procedure wont be executed.
Maybe there is an easy (vba) solution, but unfortunately I couldnt
find it.
Thanks for your help!
Andreas
Andreas,

The only ways I can think of this happening are:

- Are you absolutely sure it's unbound? If you're binding to a field
that's being set somewhere else, that would cause the behavior you
describe.
- Is there a default value in the combo's properties?

You can use VBA to set the combo's value to Null to deselect anything,
but I figure it's better to trap the cause of why it's pre-selecting a
value.

Hope this helps,
James

Loading...