PDA

View Full Version : Combobox



nepotist
10-23-2008, 08:18 AM
Hi,
I have combo box on a form whose values is used as a parameter for a query.
I am looking for some one to help me with the formating of combobox.
WHEN the user clicks the dropdown. he can view three columns first id and second name and third is location. the first four digits of the id are actually the year so if the user starts typing in the year it would take you to the id starting with the year. It is nice. I plyed around with it and just typed in a year and not hte complete id and closed the form.. the next time i opended it i am able to see the year that i entered previously.. which means that it has added that year as a primary key to the table.. I dont want that to happen. How can i avoid this ...

CreganTur
10-23-2008, 08:27 AM
Open your form in Design View. Click on your Combobox and navigate to the Data tab of the property sheet.

Change the Limit To List property to Yes- this means Users cannot add values to the list :thumb

nepotist
10-23-2008, 08:30 AM
Dam MAN... I a so dum.... :(
:beerchug:
You are man randy

FrymanTCU
10-23-2008, 08:39 AM
Dang, Randy always beats me to the easy ones!

CreganTur
10-23-2008, 08:44 AM
Dang, Randy always beats me to the easy ones!

Sorry- boring day at work :sleep2:

nepotist
10-23-2008, 09:41 AM
Dang, Randy always beats me to the easy ones!
Dont you worRY man.. there will be plenty comming as long I am here :P

FrymanTCU
10-23-2008, 10:37 AM
Dont you worRY man.. there will be plenty comming as long I am here :P

I'm the same way, I've picked up all my computer knowledge from the web and trial & error. I wish I didn't need VBA but it seems like a requirement for any fully functioning database.

nepotist
10-23-2008, 10:44 AM
Here is one more question

I have a project edit form, and it contains three txt boxes ONE ID , TWO YEAR, THREE number,
It worked fine with out any error... Later I realised that I need to lock these txt boxes so that users cannot change it as it would change all id and all database might get messed up..
now that when i run it there is button that says another project which would close the current project and open a project selection form. wHEN I click it is gives me a error saying that the record has been locked that is the query behind the form.. and try again after some time
what do I do ??

nepotist
10-23-2008, 10:53 AM
Sorry i wont give you one more change.. I figured it out :D..
Mods please dont mind me posting stuff like this....

This question is related to my initial post.. as randy said i did change the limi to list and it worked fine.. but while I was playing with the properties of the combox... I dont know what i did but not when i start typing the year it dosent filet the list to the projects(I mean it does not show the projects with id starting with that year.) what property makes me do that ??

FrymanTCU
10-23-2008, 11:12 AM
I don't see anything that would disable that in the properties, my favorite fix for these types of errors is closing the database a re-opening : pray2:

You could add something to the KeyPress setting that would filter the drop down as you type but unless the list is super long I don't know if it would be worth the effort...