f



Adding Combo Box Text To A Text Box

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.

0
cqdigital (532)
8/5/2007 11:52:03 PM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

2 Replies
927 Views

Similar Articles

[PageSpeed] 58

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/Forums.aspx/databases-ms-access/200708/1

0
missinglinq
8/6/2007 3:37:37 AM
Thanks.


0
cqdigital (532)
8/6/2007 4:33:02 AM
Reply:

Similar Artilces:

Text from required text box to read-only text box
Hello, I am fairly new to JavaScript and its use in Acrobat Professional. My situation is this: I have a form with a text box field which is required for the user to enter his/her name. I would like the required text box to display the name in all caps. I also need the user's name to appear in a read-only text box later in the form, which I would like to have the first letter of the user's first, middle initial, and last names to be capitalized. I would also like to have all required fields on the form highlighted in yellow, but the highlighting not printed. Lastly, I would like the...

Combo Box and text box
I have a combo box and a text box. Text to be display will be contigent upon what is selected via the combo box. How do I do this? I put the following code in the text box object: var a = get thisField("combobox") If (a==1) { event.value = "Test1" } if (a==2) { event.value = "Test2" } What I am doing wrong? "Mike" <hhey2@lycos.com> writes: > I have a combo box and a text box. Browsers don't have combo boxes. Is it a select element and an input element? Or is it not a browser you are talking about? > Text to be display will...

combo box with Text box
I have a combo box and a text box. Text to be display will be contigent upon what is selected via the combo box. How do I do this for Acrobat 4.0? I put the following code in the text box object: var a = get thisField("combobox") If (a==1) { event.value = "Test1" } if (a==2) { event.value = "Test2" } What I am doing wrong? ...

Unbound text box, text>255, MS Access/PostgreSQL
Hello. I have the following problem with MS Access/PostgreSQL combination: There is a form in Access that has an unbound text box, used for entering a commentary of a batch of records. There is a DAO Append Query that has a parameter that is passed from the text box using parameter of DAO QueryDef object. I adjusted B7 parameter (Text as LongVarchar) in connection string (ODBC driver) to 1, so that Access links PostgreSQL Text fields as Memo fields in Access. The intention was to be able to enter unlimited length commentary into the field. But, although I can enter unlimited text by using...

text box dependent on other text box entry
I want to have a form with 40 PartNumber text boxes, 40 PartDescription text boxes, and 40 PartPrice text boxes. The name of each would vary of course, but I want to be able to enter the part number in the PartNumber in the PartNumber text box for each replaced part. After the number has been entered the PartDescription and the PartPrice should show up in the other respective text boxes. I will be linking to a table that includes 3 columns labeled PartNumber, PartDescription, and PartPrice. For instance, if I enter "12345" in the PartNumber text box then the description of the pa...

Access Report Footer displaying the sum of a text box values in the Detail in another text box in the page's footer
How can I (if I can) display the sum of a text box values in the Detail in another text box in the page's footer? For example, I have a text box called "txtPoints" in the detail which displays the total points for a current activity. As it cycles through all the activities it displays the various points for each activity. In the page's footer I want to display the total points. Here's what I have in the control source for the totals textbox: =Sum([txtPoints].[Text]) but that doesn't work. Any suggestions? On Wed, 22 Sep 2004 23:17:03 GMT, Richard Hollenbe...

Text box linked to combo box
Good day, I am new to Access and need a question answered please. I have a form based on a table (tblQualityEmployees), for some of the fields it looks up a value in another table (tblGroups). The tblQualityEmployees consists of the following: EmployeeID FirstName LastName Group1 Group2 Group3 Group4 Group5 The tblGroups consists of the following: GroupID Groups Description What i want to do is, in the form have text box that displays the Group description next to each group. I tried making the "Control Source" field Group1 combo. This brings in the relevant ID number which is...

Combo box fills text box
Hello again, I have a form that fills a text box with data according to the selection in the combo box. Two questions please: 1) The combo box does not have a control source so when opening the form, the combo box is empty but the text box already contains the first record. What do I need to do to either have both the combo box and text box empty on open or have both contain the first record on open. (If it takes VBA code, please point me in the right direction as I have not worked with it since '99). 2) I'm getting a runtime error 3077 on one of the records. I checked it to see i...

Combo box dependent on another combo box, text part is blank
Hi, I have a form with several combo boxes, continuous form format, with record source a query off an Item Table. The fields are Category, Subcategory, and Color. I am displaying descriptions, not ID's, so I have to convert the ID's from various lookup tables. The combo boxes work fine except for subcategory, which is dependent on category. Depending on category, the drop-down box for subcategory will display different items. (for example, when Category is Furniture, Subcategory will display drop-down list of 'Dresser, Nightstand, Desk...". Without clicking on the drop...

Show Text box on Top of another Text Box
Hi, I have a text box with conditional formating so if certain conditions are m= et it display either Green or Red. I want to put another text box on top of= it (this text box is smaller than the "conditional formating" text box) an= d have the the text in this text box displayed. Basically I want the condit= ional text box to form a colour border around the displayed text. How do I do that? Thanks, Barry On Apr 1, 11:18=A0am, Barry Edmund Wright <barry.edmund.wri...@witstoronto.ca> wrote: > Hi, > > I have a text box with conditional formating so if certain condi...

Update Combo Box from a Text Box Help
I am trying to make a combo box dependent on a text box. I cannot get the combo box to pull the related data from the text box. I have been all over this user group & have tried several versions of code to no avail. I would like to display all contact names (in the combo box) related to the customer number in the text box. Here's what I have: Table: TOrdAck Fields: OACustID, OAContact Table: TCust Fields: CustID, CompanyID, CompanyName Note: The OACustID and the CustID establishes the relationship between the two tables. Query: QCust Fields: TOrdAck. OACustID, TOrdAck.OAContact...

Change a text box to a combo box in VBA
Can I change a text box to a combo box programmatically? Just wondering if this is possible. I'm not sure if you could change it from a text box to a combo box. I don't think you can. However, you could simply overlay a combo box on top of the text box, then just make whichever of the two you wanted visible appear with code easily. ...

Adding text to a text box that shows on the bottom
Hello If i add text to a textbox (like text1.text=text1.text & vbcrlf & vbcrlf "newtekst") this text is added to the bottom of the text (multiline is on). When the text has more lines than fit into the box the text is added below 'outside the box.' and the vertical scrollbar (ofcourse enabled) scrolls always to the top. So you can not see what text is last added (unless you scroll of course manual to the bottom but than also the programs pauzes and as soon as text is added you are again in the top of the box). Is there a way with the standard VB6 textbox to have the v...

Text box linked to Combo Box #2
Good day, I am new to Access and need a question answered please. I have a form based on a table (tblQualityEmployees), for some of the fields it looks up a value in another table (tblGroups). The tblQualityEmployees consists of the following: EmployeeID FirstName LastName Group1 Group2 Group3 Group4 Group5 The tblGroups consists of the following: GroupID Groups Description What i want to do is, in the form have text box that displays the Group description next to each group. I tried making the "Control Source" field Group1 combo. This brings in the r...

Listbox based on text box and combo box.
On an unbound form, I have a combobox called 'cboproducttype' and a text box called 'txtamountappliedfor'. I have an Add button that I would like the user to be able to hit once a product and amount applied for has been entered. This should populate an unbound listbox to display their selections. A user can select one or more sets of product types and the amount applied for. They should also have the functionality to remove a 'set' if they made a mistake without the need to rebuild the whole listbox of selections. Then - I want to loop through the listbox of select...

combo box / text box php mysql
this is the the code, now here is the final result.... I get one combo box and one tex box come up, but they are empty... DAMN!!! Any ideas on what Im doing wrong please.. Thanks Again <?php require_once('..\library_database\Connections\onlinequote.php'); ?> <? function select_cases_price () { $qy = "SELECT SellingPrice, Description FROM cases"; $rs = mysql_query ($qy) or die (mysql_error ()); while (mysql_fetch_array ($rs)) { $select .= "<option value='{$r[0]}'>{$r[0]}</option>\n"; $prices[] = $r{1}; } return array ($select, $prices);...

Populate text boxes with combo box selection
I need to populate text boxes for instance with employee information using their unique employee works number selected from a combo box. Can anyone help, I am told thru visual basic this can be achieved. godber wrote: > I need to populate text boxes for instance with employee information > using their unique employee works number selected from a combo box. > Can anyone help, I am told thru visual basic this can be achieved. You can do it without VBA. Add extra columns to the combo box Set the width of the columns to 0 if you want to hide them In the text bnoxes you want to show the...

help: combo box vs. text box
Please help! I have a table "tblDept" with columns like DeptName, DeptChair, DeptPhone. In a form, I created a combo list that holds all the DeptName. By selecting one of the DeptName from the combo list, I want the DeptChair and DeptPhone to be shown automatically in two text boxes. The following code is trying to show the DeptChair in a text box. Private Sub cboDeptName_AfterUpdate() Dim MySQL MySQL = "SELECT DeptChair " MySQL = MySQL & "FROM tblDept " MySQL = MySQL & "WHERE AttorneyName = " MySQL = MySQL & "'" &...

update a text box using combo box
Hi all, I have 3 unbound combo boxes in my form which basically helps me to filter for values. I need to update a text box which will be stored with the value I receive after filtering with the combo boxes. I know of the column(n) method (derived from the third combo). However if the user does any sort of manipulation in the first or second combo then the value in the text box doesn't change accordingly. Is there any other way to update the text box in a more accurate way. Please help. TIA -- Regards, B Burghew wrote: > Hi all, > > I have 3 unbound combo boxes in my for...

populate text box when user enters data in another text box
hi, I'm very new to Access and have been searching newsgroups for a few days but can't find exactly what I need. I want to be able to do the following: * user enters patient's hospital number * after pressing enter, a function fires that looks up the patient name & surname corresponding to the hospital number just entered (in the "patients" table) * if the hospital number exists in the patients table then name & surname are filled in in two read-only text boxes * if the hospital number does not exist in the patients table then user is prompted to enter details for...

Input text boxes, check boxes, and radio boxes
I was told that dotnet generates classes for input tags like this: <span class="hello"><input type= "checkbox"></span> The problem here is, the "input" class is overriding the "hello" class. Ideally I wanted the html to be this way: <input type= "checkbox" class="hello"> However since dotnet insists on doing it the first way, it's not working for me. My question now is, how do I make it work so that "input" isn't overriding "hello"? Actually, I'm trying to set ...

COMBO BOX, FILTER TEXT BOX AND NEW RECORD
I made a database with two tables (tblsender, tblreceiver). I have two combo boxes on the form. I can autofil all text boxes based on the value entered in the combo box (for example, cbosender_name.column(2) etc). But when I want to add a new record, I can enter only to the combo box and cannot add anything to the text boxes because they are bounded to the cbosender_name. Can anyone please help me? Thanks. ...

select 2 combo boxes to fill other text boxes
Hi, there, I am a beginner on Access. I have been taking so long time to try to figure out his, but so far, no clues. I want to select 2 combo boxes and Access will automatically fill in other 5 bound text fields for me. I searched all groups and microsoft support sites, no result. The 1st combo is "Capacity", the 2nd combo is "Door", I want to change 2 combo boxes with different selections, the 5 text boxes value will be changed accordingly. The form is based on a query which combine 2 tables together. That is, I can not change the form's source to another query. A...

Fill text box based on combo box selection
Okay this one has me stumped. I have a table called Review_Statements with the following columns: statementid type statement1 statement2 statement3 I have a form called SR_Review with an unbound combo box control (rationale_type) that is based on the statementid and type field of the table above. I also have another text box control on the same SR_Review form called rationale. This field is bound to field called "rationale" in another table called SR_Reviews. Here is what I *want* to take place. The user makes a selection in the rationale_type combo box, and based on the statemen...

Web resources about - Adding Combo Box Text To A Text Box - comp.databases.ms-access

File:Old adding machine.JPG - Wikipedia, the free encyclopedia
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License , Version 1.2 or ...

Ultraviolet Continues To Press Case For Adding Women To Facebook’s Board
Women’s group Ultraviolet continued to press its case for Facebook to add women to its board of directors , releasing a new video stating its ...

Adding Tor support on Android
Since then, a sizeable community of people has grown to use this feature and help us make it more efficient and reliable. We commonly receive ...

Adding Social Context to your content
Using the Facebook Social Context API. The Social Context API lets you discover social connections about objects, people and places.

WordPress Challenges the Facebook Comments Box by Adding Facebook, Twitter Logins to its Comments Widget ...
WordPress just announced that it has added WordPress.com, Twitter and Facebook login options to its own comments widget. Users can also be logged ...

CSS3 : What is the best method for adding 2x images to webpages that will be displayed on the new iPad ...
Answer (1 of 14): WebKit deals in logical pixels and a device pixel ratio to render stuff. It knows nothing about the physical pixels of the ...

Math Dots(Dinosaur):: Connect To The Dot Puzzle / Kids Flashcard Drills for Adding & Subtracting on the ...
Get Math Dots(Dinosaur):: Connect To The Dot Puzzle / Kids Flashcard Drills for Adding & Subtracting on the App Store. See screenshots and ratings, ...

Adding weight - Flickr - Photo Sharing!
Army Spc. David Helton, Company A, 2nd Battalion, 87th Infantry Regiment, puts more weight on the barbell at Combat Outpost Apache in Wardak ...

Senator Obama calls Bush "unpatriotic" for adding trillions to debt www.RightFace.us - YouTube
http://www.RightFace.us In a purely ironic twist then Senator Obama calls President Bush "unpatriotic" for adding trillions to debt. bush added ...

Apple Pay experiencing lengthy outage with adding Visa debit and credit cards
If you’re having trouble setting up Apple Pay this morning, it’s not just you. Apple is currently reporting an hours-long issue with adding credit ...

Resources last updated: 2/22/2016 1:11:45 PM