Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combobox Duplication Problem

Status
Not open for further replies.

Evmori

MIS
Jun 17, 2016
3
US
I have a combobox on a form in Access 2010. My problem is that when I use the combobox and save the record, it generates a duplicate of the option chosen. This is cluttering my table and repeating information that is already documented. The only code associated with the combobox is:

Private Sub LocationNum_Change()

Me.ShipAdress.Value = Me.LocationNum.Column(2)

Me.PlantName.Value = Me.LocationNum.Column(1)

End Sub

This code simply populates two related fields on the form with the correct corresponding data. I don't understand why it is doing this. How can I stop it from generating duplicate data? I appreciate the help in advance
 
Is the [tt]LocationNum[/tt] a name of your combobox?
If so, the Change event fires only when you actually type something in the combo box, and it does not fire if you select an item in the combo box.

Have fun.

---- Andy

There is a great need for a sarcasm font.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top