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

Nearly there with ComboBox

Status
Not open for further replies.

hdgirl

Technical User
Feb 2, 2002
131
GB
I have created a form with a combobox on that gives two options when you select one of them this then opens a report showing all entries based on that selection. I have tried to do it again and when i place the combobox on the form instead of giving the two options it displays all the entries of those selection i.e
Fault
Fault
Fault
Fault
Request
request
Request

Displayed in the combobox instead of
Fault
Request

What am i doing wrong this time

CJB
 
Open the source for the combobox, right click in the top portion of the window, and select properties. Look for a property called UniqueValues and set you yes. You are done! If we knew what it was we were doing, it would not be called research, would it? - Albert Einstein [atom]

Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
 
I can't find unique values in the combobox or form only the query properties and this was'nt how i done it the first time i think its to do with how i'm building the form or the combobox
CJB
 
it should be set in the query properties window......that is the exact place to make it happen. If we knew what it was we were doing, it would not be called research, would it? - Albert Einstein [atom]

Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
 
Just tried this and the combo box is still showing all entries. I also strated from scratch but got the same result CJB
 
You are obviously going to get into combo baxes a lot so here we go.

Create a Table for your combo box and populate with the required options. Use this table whenever you want to populate a field from a combo box.

In the Ideal World the table should have two fields an Id field and a description field (the text you want to display) but if yo only want a couple of selections one should do (stand by for comments)

So in your case the table would contain a field with the values

Fault
Request

If you wish to add another simply add it to the table and it will appear on all your combo boxes

Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
Thanks Neil,

But what's happening is that when i put the combobox on the form it does,nt just show the choices fault and request but all the records that have selected either one of these which is not what i had the first time.... CJB
 
Where is the combo box getting its data from?

You could send me a cut down copy and I will take a look at it for you.

Please Tools, Database Utilities, Compact and Repair first.

Check the file size File, Database Properties and select the general tab. If it's under 1 MB send it to me for a look

Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
Neil,

I managed to do this after but thanks for your help and i have used your responses before so thanks again CJB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top