If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to Relate an "If Other Please List" Memo/Text box to a Combo
I am creating a database using Access 2007.
The database has lookup tables that appear as Combo Boxes on the main form. Some of the combo boxes have an "other" option. If "Other" is selected in the combo box, then the user is to enter the information in a text or memo box. Example Combo Box: Option1 Option2 Option3 Other I'm not sure how best to set this up so that everything is related properly. I was thinking that I could create a subform with a field for the combo box and a field for the text/memo box. However, the users won't be entering multiple lines of selection. They will be selecting only one Combo Box item per Form Record. So, I don't think that this is the best approach. Is it possible to have the Combo Box as a field on the Form and the Text/Memo box as a field on the form? If so, how would I do this and what kind of relationships do I need to establish? The database will have approximately 10 of these. I appreciate any assistance/ideas received. -- Message posted via http://www.accessmonster.com |
#2
|
|||
|
|||
How to Relate an "If Other Please List" Memo/Text box to a Combo
Use 2 fields in your table:
OptionID the number field the combo box is bound to Descrip the text field where the comment can be entered. The description is available regardless of the option chosen, but is expected if the 'other' option is chosen. If you want to, you can take it further. Typically you will have a lookup table that explain what these options are; it acts as the RowSource for the combo. You could add a field to this table to indicate if the Descrip is expected. You can then use the LostFocus event of the combo to SetFocus to the 'Descrip' field if one is expected, or to skip that field if it was one of the other options. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "skyrise via AccessMonster.com" u49824@uwe wrote in message news:923285a8950e9@uwe... I am creating a database using Access 2007. The database has lookup tables that appear as Combo Boxes on the main form. Some of the combo boxes have an "other" option. If "Other" is selected in the combo box, then the user is to enter the information in a text or memo box. Example Combo Box: Option1 Option2 Option3 Other I'm not sure how best to set this up so that everything is related properly. I was thinking that I could create a subform with a field for the combo box and a field for the text/memo box. However, the users won't be entering multiple lines of selection. They will be selecting only one Combo Box item per Form Record. So, I don't think that this is the best approach. Is it possible to have the Combo Box as a field on the Form and the Text/Memo box as a field on the form? If so, how would I do this and what kind of relationships do I need to establish? The database will have approximately 10 of these. I appreciate any assistance/ideas received. |
Thread Tools | |
Display Modes | |
|
|