Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ms access + combo box on click - value to textbox

Posted on 2011-02-11
2
Medium Priority
?
402 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 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 120

Expert Comment

by:Rey Obrero (Capricorn1)
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

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

877 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