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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
Back
Top