PDA

View Full Version : Combo box



nepotist
10-20-2008, 11:26 AM
Hello there,
I am creating a addition table to the database, this table would have a field that can have values from A to F.
with the existing condition I do not have information about this field for all the records.
I am creating a edit form, so that the user could update all info when available, and I am trying to make that field as combobox in the form and want it to show A to F values when the drop down button is clicked. How do I add these values to the combobox..

I know this quite simple,I done this before,but cant recollect it .
Thank you for all the help

CreganTur
10-20-2008, 11:41 AM
this table would have a field that can have values from A to F.
Use the Lookup Field data type and create your own list of A - F; you can always adjust the values to add more letters at a later date.

If you do the above, then on Form Design view you can just drag the above field onto your table and it will automatically be a combobox.

Does that answer your question?

nepotist
10-20-2008, 12:11 PM
Well I have already done that. When I designed the table I made it a look up field. I created two form form1 is a based on a query that would list all the record numbers and then after clicking on the button it would show all the info of that particular record., this is where I want that particular filed to be a combobox, it should show the exisitng value if any and also allow to change it by changing the drop down box.

CreganTur
10-20-2008, 12:29 PM
Add a combobox into your Form and set the row source to show your existing value list (A - F). Then use VBA to set the combobox's default value to equal the field's value for the current record.

HTH:thumb

nepotist
10-20-2008, 12:53 PM
Sound like a nice Idea, but dint work when i tried it, this is what I did, the recourd source value : "A;B;C;D;E;F", The record source type I tried both the filed list and value list.. nothing works.
:(

CreganTur
10-20-2008, 12:54 PM
Can you post an example DB?

nepotist
10-20-2008, 01:10 PM
Hey Randy ... Guess what.. I figure it out. I intitally had that field as textbox and later changes it to a combobox , so i deleted it and added the combo box again and it works fine :D..
Should have tried that before I created this thread
Thank you