Solved

ms access + combo box on click - value to textbox

Posted on 2011-02-11
2
376 Views
Last Modified: 2012-05-11
i am using access 2010, and would like to have a combo box and text field on a form, i would ilke when the user selects a value from the combo box, it adds it to the value of the text box, so the user can add several values, the value would be seperated by commas. I am thinking of using a macro - with an after update event, but not sure how to append to the value already in the text box.
0
Comment
Question by:dkilby
  • 2
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 34874441
use the afterupdate event of the combo

private sub combo0_afterupdate()
dim str as string
str=str & me.combo0

me.text1=me.text1 & str & ","

end sub
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 34874523
or this one

private sub combo0_afterupdate()
dim str as string
str=str & me.combo0

if me.text1 & ""="" then
     me.text1=str
     else
     me.text1=me.text1 & "," & str
end if
end sub
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now