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!

Combo Box Errors

Status
Not open for further replies.

bcooler

Programmer
Jun 13, 2009
132
Hello all-

I have created a combobox which shows 7 columns when the user clicks it (bound column=1). The Rowsource is based on an automated Excel Export that I have some control over. There is NO primary key on this Excel spreadsheet (if that's even possible) and the bound column I've chosen (part number) is duplicated many times (which is the problem I think).

Other unbound textboxes in the form fill in automatically based on the combobox's column values. For example:

Code:
=[cboPN].[column](4)

is within one of the boxes, which says to be equal to the 4th column of the combobox's choice.

Now, this generally works well for me, but when I pick a record in the combobox that has same values for the 1st column (part number 12345, listed three times as an example), the unbound textboxes will not modify themselves for the particular record that I chose. They stick with the first instance of part number 12345 no matter which record I choose that happens to include 12345. Other records with different part numbers are fine and update themselves as expected.

Like I suggested earlier, I believe this is a primary key type issue and Access is getting confused on which record I am referencing, but I'm not sure how to fix that?

Thanks!
Brian
 
Duane-

Thanks for the response. Can you tell me how I would do that on a linked spreadsheet? This spreadsheet is exported from an external software on a daily basis.

Brian
 
Actually, I just talked to an admin for the data coming out of the external source. We found the primary key from that source and included it into the Excel export. That seemed to fix things. Thanks for your help!

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top