Solved

ms access + combo box on click - value to textbox

Posted on 2011-02-11
2
391 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
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…
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 …

634 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