Full Version: Add new value to combo box
UtterAccess Forums > Microsoft® Access > Access Forms
snbc
Hi,
apologize as this question has already probably been asked, but I couldn't find a sufficient answer. I have a form for a questionnaire based on a table. The form uses combo boxes to display values the user can select to fill in the combo box. I have tried to anticipate all the possible answers, but because some of the answers are fill-in-the-blanks, I cannot possibly anticipate all the answers. Is there a way to allow the user to write in their own answer to a question? (I realize this is not ideal as the quality control can be a nightmare, but there is only one user so I am not too worried about it). For example, one of the combo boxes asks what type of fish they have caught in the past year. The table this combo box is based on has about 10 different fish listed, but if the user wants to type in a fish not in that list, can they? If so, how? Thanks for any help!
-Sarah
theDBguy
If you don't care to save the new item into the list, you can just change the property Limit To List from Yes to No. HTH
snbc
Thanks, I tried that and got the error message that the "first visible column which is determined by the ColumnWidths property isn't equal to the bound column. Adjust the Column Width property first and then set the LimitToList property." Which I also tried, but then I was looking at the autonumber instead of the value in the combo box.
theDBguy
So, you are using a related table and not a Value List. In that case, you might want to use the Not In List event instead. Look up the example in Access Help and let us know if you have any question on how to implement it. Good luck.
NoahP
Are you letting the user enter data directly in the table? I ask since you posted in the Tables & Relationships Forum and not the Forms Forum.
If you're letting them directly into the tables, then that would be the first thing you should fix and then use the Not In List of the form to allow them to add new choices to the lookup table.
snbc
No, the user is filling in the form. I didn't post in the Forms forum since it seemed to be a problem related to my underlying tables. Sorry if this is the wrong forum.
NoahP
No problem. I'll move it to the Forms Forum.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.