Solved

ms access + combo box on click - value to textbox

Posted on 2011-02-11
2
382 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 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 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

838 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