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

Drop Down Combo Question

Status
Not open for further replies.

Monguse

Programmer
Mar 11, 2002
63
US
I want to put a D/D Combo box on a form, so that when a user clicks on it it will look-up data in a look up table and use that to add infromation to a different table.
I place the Combo box on the form and used the Combo box wizard that pop's up to tell it which table to use for look up and which table to store the data in. My problem is two fold - When I open the form every time I try to change records (there are over 900 in the DB) I get an error message telling me that the data is either the wrong data type or to long for the field. I have no idea why it's doing this.

Second it seems as if (based on the Combo box wizard) - you cannot just type new data into the box only what already there. I need to be able to both look up existing infromation and add new data, can this be done?

Thanks - if this is not clear feel free to ask a question. "The beauty of the second amendment is, that it will not be needed until
they try to take it." - Thomas Jefferson
 
1) it sounds as if you selected the wrong "bound" column in your combo box, and you're trying to shove a text guy in to a number field or vice versa. The BOUND field in your combo box should be the same field (functionally) as the target, e.g

Target Field: IDNumber
Combo Box: Name / ID Number

Pick name, but ID number must be the bound column of the combo box. Capice?

2) Check the LIMIT TO LIST property and the NOT IN LIST event - they allow you to alter the standard behavior of a combo box. If the combo box is BOUND to a field in your working set, you should be able to do what you want. I'd just suggest caution - the usual role of a combo box is to display values from a lookup table and allow easy, error-free entry, as well as utilizing relational and referential integrity to ensure correctness of the data. If you let a user "just type in a value", it may be wrong.


Remember, you're unique - just like everyone else
You're invited to visit another free Access forum:
or my site,
 
Itme 1. Yes, you were right that's is what I had done wrong, it works now. Thanks for the help.

"The beauty of the second amendment is, that it will not be needed until
they try to take it." - Thomas Jefferson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top