By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,509 Members | 2,201 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,509 IT Pros & Developers. It's quick & easy.

combo box to text box

P: 1
hi, i have a combobox with a list of items for the user to select. if the item is not contained within, the user can add it and it brings up the add item form.

my problem is relatively simple, how can i get the value i have just typed to appear in the related text box on the add item form.

i tried the whole .itemdata(0) thing but it brought up the first value in the list, not what i typed.

thanks
jared james
Jul 15 '07 #1
Share this Question
Share on Google+
1 Reply


puppydogbuddy
Expert 100+
P: 1,923
hi, i have a combobox with a list of items for the user to select. if the item is not contained within, the user can add it and it brings up the add item form.

my problem is relatively simple, how can i get the value i have just typed to appear in the related text box on the add item form.

i tried the whole .itemdata(0) thing but it brought up the first value in the list, not what i typed.

thanks
jared james
You did not provide your, but in the form_load event of the add item form, try the following code:

Me![YourControlName].DefaultValue = """" & strVariable & """"


Replace yourControlName with the actual name of the control that is being filled in and replace strVariable with the global variable you are using to capture the new item being added. Note that default value is used because it allows the "add" transaction to be canceled with out having to delete what was entered.
Jul 15 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.