clear combo data on add- [comboboxname].ItemData(n) not working

D

DianaH

I am trying to clear the previous combo box data data on a form when adding -
this is the statement I am using in the form's default value for the field
[comboboxname].ItemData(0) - The first record in each combo box is a blank.

Why is this not working?
 
P

PJones

I'm assuming that the form is a data bound form and the combo box is also
data bound?
 
P

PJones

Try adding this code on the current event.

Private Sub Form_Current()
If Me.NewRecord Then ' a new record
Me.Combo0.DefaultValue = Me.Combo0.ItemData(0)
End If
End Sub
 
Top