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

Adding Combo Box Text To A Text Box

P: n/a
I have a combo box and a text box on a form. When I choose a value
from the combo box, I want it to be added to the textbox. I'm able to
do this by using the following code when I click the combo box:

Me!Textbox = Me!TextBox & Me!ComboBox

I now need the additional combo box items to be added on a new line in
the text box each time I click the combo box. I've tried using
Sendkeys "^{Enter} but I'm not achieving the desired result.

I know this is probably very simple, but I'm just not seeing it. Any
help is appreciated.

Aug 5 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
This will do it:

Private Sub ComboBox_AfterUpdate()
If IsNull(Me.Textbox) Then
Me.Textbox = ComboBox
Else
Me.Textbox = Me.Textbox & vbNewLine & ComboBox
End If
End Sub
Wayne wrote:
>I have a combo box and a text box on a form. When I choose a value
from the combo box, I want it to be added to the textbox. I'm able to
do this by using the following code when I click the combo box:

Me!Textbox = Me!TextBox & Me!ComboBox

I now need the additional combo box items to be added on a new line in
the text box each time I click the combo box. I've tried using
Sendkeys "^{Enter} but I'm not achieving the desired result.

I know this is probably very simple, but I'm just not seeing it. Any
help is appreciated.
--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200708/1

Aug 6 '07 #2

P: n/a
Thanks.
Aug 6 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.