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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box Duplicates and linking to text box

Status
Not open for further replies.

ccepaulb

Technical User
Jan 29, 2004
89
US
I have what I assume is an easy question.

I have a form that needs to have a combo box and text box. What I want to do is have the combo box list our items, and the text box have our item numbers populate based upon the item description selected from the combo box.
Two problems; 1) Some of our items show up multiple times in the table, I need to only show each description once. 2) I thought I had the item number text box working ok, but whenever I open the form it populates it with the first item number, while the description in the combo box is blank?

Any help would be greatly appreciated.

P.s. is there a way to do this without using code?

Thanks, Paul
 
You must have a unique id for the records. An AutoNumber Field will be enough.
Add the AutoNumber Field to the table and also to the Combo and Form.
Set the criteria to the AutoNumber.

ComboBox Wizard will do it if you select the third option from the wizard dialog

Zameer Abdulla
Visit Me
 
I already have a primary key on a unique ID. I also did pick the third option, still not working right???

-Paul
 
The Zip file appears to be empty?

I did get it to work, I actually had to take out the primary key field, I had to use the group by function in the query behind the combo box to remove my duplicate descriptions to be listed, problem was that when I did that, it was grouping on the ID filed as well, causing the descriptions to show as duplicates again. When I took out the ID field, it ran correctly.

Now my only problem is that my description combo box is blank when I open the form, but the text box that is linked to the combo box and shows the Item # based upon the item description selected always shows the first item #? I'd like for the text box to show blank when I first open the form? I tried to mess around with the default value settings, but it did not work?

Thanks, Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top