f



Displaying text in a text box depending on selection made in list box on same form

Hi I have an unbound text box on a form from which the user can choose
a product. When the user chooses a product, I want the text box on the
same form to display the description of that product. right now I can
get it to display the row number of the product that corresponds to
what the user clicked but not the value of the Product Description
which is what I want. The fields in the tables are both text.

here is the code:

Private Sub LstContactProducts_AfterUpdate()
txtProductDescription.SetFocus
txtProductDescription.Text =
LstContactProducts.Column(2,txtProductDescription)
End Sub

Thanks in advance

Colin
0
cward002 (7)
8/1/2003 3:10:21 PM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

1 Replies
1371 Views

Similar Articles

[PageSpeed] 35

Colin,

why don't you create the combobox, with from a table or query with all the
information you need and use cboComboboxname.column(0),
cboComboboxname.colum(1) etc etc...to populate the fields you want?

HTH
Michael
"Colin Ward" <cward002@sympatico.ca> wrote in message
news:2a660c80.0308010710.26b3257@posting.google.com...
> Hi I have an unbound text box on a form from which the user can choose
> a product. When the user chooses a product, I want the text box on the
> same form to display the description of that product. right now I can
> get it to display the row number of the product that corresponds to
> what the user clicked but not the value of the Product Description
> which is what I want. The fields in the tables are both text.
>
> here is the code:
>
> Private Sub LstContactProducts_AfterUpdate()
> txtProductDescription.SetFocus
> txtProductDescription.Text =
> LstContactProducts.Column(2,txtProductDescription)
> End Sub
>
> Thanks in advance
>
> Colin


0
pmbragg (54)
8/1/2003 3:25:29 PM
Reply:

Similar Artilces:

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 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...

list box in form? how do I get it to text box
Hi, I made a query to a table and then based a lookup filed on that query. Now when I refresh the table I do not get the relationship error - you can't delete table cause relationship is present - instead the table gets refreshed and the query holds the relationship with other tables. Problem As far as I know this works fine.If there is a better simpler way please advise. Also, the query is used as a list box in other tables now to look up a list of names sorted ascending. When I use this query lookup in form the form displays this as a list box - I'd prefer it was not and just a single text box - how is this done? Thanks in advance ...

Multi Select List Box options to text boxes
I was wondering if anyone had a code example for sending the multi-selected choices in a list box to a test box Private Sub Command2_Click() Dim strTemp As String, varItem As Variant For Each varItem In Me.List0.ItemsSelected strTemp = strTemp & ";" & Me.List0.ItemData(varItem) Next strTemp = Right(strTemp, Len(strTemp) - 1) Debug.Print strTemp End Sub This will loop through the selected items in listbox List0, add their values to the variable strTemp divided by semicolons then removes the leading semicolon and prints the results to the debug window. -- Wayne Morgan M...

Text Box to List Box
Every month I get a huge list of product codes I need to track. I have written a very detailed script to perform this task. The problem is, I copied someone else's form because I was in a rush. I have yet to sit down to tweak this, but I'm hoping I can use a bandaid rather than re-write the process. The form I use allows you to enter (or cut-and-paste) one product code at a time into a combo box. You press a button and the contents empty into a list box. You can do this however many times you need to, with the list box adding a new record each time. My script reads the listbox an...

Selecting text in a text box
When I attempt to select text in a text box, the text from the cursor position to the end of the text is instantly selected as soon as I click the mouse down. There seems to be no way to select just a small portion of the text in a text box. This seems pretty basic. What am I missing? I'm using Access 97 on an XP system. Steve Richfield First, (I don't remember if this is an option in 97) check Tools|Options|Keyboard tab, Behavior Entering Field. This setting will adjust the behavior for all forms and controls. Next, you would need to click at the start of the area you want to hi...

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...

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. 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:/...

Working with list box and text boxes
I am a novice to visual c++. I created a text box, a list box and a button. What am trying to do is to make the information I typed in the text box appear in the list box when I click on the button. I try to do it like you would in visual basic 6, but it is not working. Any help will be greatly appreciated. By the way, am running a dialog application. Victor Kareem > I am a novice to visual c++. I think you will find MSDN, or a Microsoft group, more helpful (wrt Windows Gui's) than a C++ group. ...

Conversion of text box as list box
I shud giv som character/char's in the textbox 1.depend upon the key press it wil go n cal som jsp 2 get the data(result set hav more than one line data)----from database here i hav one doubt tht shal v cal jsp in key event functions....i'm not getting....it......if anybody hav it plz fwd it.k. 2.After generate this jsp we wil get the data that i shud put into dropdown list.For tht how shud i convert textbox as dropdown list after generate the jsp...here i'm getting mainly 2 probs a) how shud i convert textbox as dropdown b) on the sam page n in the sam place i shud put tht dropdown list ... c)How can v refresh the sam page? I need this one urgently.....i need the requirement lik this...is it possible..if yes...how cud i approach it? If No,any alternate 2 get it? Plz ...help me...4 this Neelu wrote: > I shud giv som character/char's in the textbox > > 1.depend upon the key press it wil go n cal som jsp 2 get the > data(result set hav more than one line data)----from database here i > hav one doubt tht shal v cal jsp in key event functions....i'm not > getting....it......if anybody hav it plz fwd it.k. > 2.After generate this jsp we wil get the data that i shud put into > dropdown list.For tht how shud i convert textbox as dropdown list after > generate the jsp...here i'm getting mainly 2 probs a) how shud i > convert textbox as dropdown > b) on the sam page n in the sam place i shud p...

Displaying text boxes from a check box
I want to make visible two or more text boxes once a user has ticked a checkbox. I know javascript will come in here, but am a newbie. However, I want to maintain the variables and move them back to PHP for updating in the relevant tables. Can anyone please give me ideas. On Mar 7, 9:53 am, chima...@googlemail.com wrote: > I want to make visible two or more text boxes once a user has ticked > a checkbox. I know javascript will come in here, but am a newbie. > However, I want to maintain the variables and move them back to PHP > for updating in the relevant tables. Can anyone ple...

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...

Auto-Fill text box from list box
To All: There is a list box populated with text (ie.names of places). A user makes a selection by scrolling through and double-clicking in the list box. This selection is then shown in a text box. How can I eliminate the user's need to scroll through the list box and double-clicking the selections? Is there a way of automatically filling the text box with matches from the list box as the user is typing in the text box? There seems to be no direct autofill property based on user input at runtime. All help appreciated. Z "Zuzka" <zuzkamiernik@yahoo.com> wrote in message n...

How do I 'SELECT All' text in a text box
I want to select all text in a multi line text box from a command butten. Thank for help Dave Try this... Private Sub Command1_Click() With Text1 .SelStart = 0 .SelLength = Len(.Text) .SetFocus End With End Sub Rick - MVP "Dave" <last2try@earthlink.net> wrote in message news:fo0b90h0j9imbvntdea3uu2mefth5teufr@4ax.com... > I want to select all text in a multi line text box from a command > butten. > > Thank for help > Dave ...

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...

How to set the selection-bar- and selected-text-color in a list box?
How to set the color of the selection bar and the selected text in a list box? Bart (v 2003) "AA Arens" <bartvandongen@gmail.com> wrote in message news:1140260216.140563.116330@g43g2000cwa.googlegroups.com... > How to set the color of the selection bar and the selected text in a > list box? All you can do is set the BackColor and the FontColor. Windows decides what the highlight color is based on your current Windows colors/theme. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com ...

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 ...

Populating text box based on combo box selections
I have a form that contains two combo boxes that are related to each other. I need to find a way to populate my text box based on the criteria of the two combo boxes so the appropriate number appears in the text box. "SHAWTY721" <u38136@uwe> wrote > I have a form that contains two combo boxes that > are related to each other. I need to find a way to > populate my text box based on the criteria of the two > combo boxes so the appropriate number appears in > the text box. It's just not possible to be very helpful with the information you provided (Whi...

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...

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...

Displaying " in a form text box
Hi all ive added a form to a script using php and the form is to hold sizes of a product which means the client needs to be able to use " to denote inches. However when this is entered and the form submitted it makes it into the table and then displays as text on the page but not inside the form as its value. Is there a way around this? Ive tried replacing " with ' and a ' together but can't get this to work in the str_replace funtion example: str_replace('"', '''', $string); and help would be greatly appeciated! Kind regards Marc monoman...

Help~ Update a Text Box associated with a selected Combo box
Private Sub PubName_AfterUpdate() Dim sql As String sql = "select PubCode from Publisher where PubName = '" & PubName.Value & "';" Set rst = CurrentDb.OpenRecordset(sql) MsgBox sql If Not rst.BOF Then rst.MoveFirst End If PubCode.Value = rst(0) <-- error End Sub PubCode is a text box and PubName is a combo box. I have a table like this: Publisher: PubCode, PubName and my form is like that... If I selected a PubName in PubName combo box, I want to change the PubCode correspondingly, since they are actually refering t...

Web resources about - Displaying text in a text box depending on selection made in list box on same form - comp.databases.ms-access

List of mammals displaying homosexual behavior - Wikipedia, the free encyclopedia
For these mammals, there is documented evidence of homosexual behavior of one or more of the following kinds: sexual behavior , courtship , affection ...

Facebook Displaying Page Insights On Page Admins’ Personal Pages?
Some Facebook page administrators are seeing modules on their personal pages displaying page insights ad, campaign , and like totals for pages ...

Facebook Displaying Unread Messages from Pages in a New Updates Module
Facebook is displaying a new “Updates” sidebar module which shows some users unread messages sent to them by Pages. Users will see the Updates ...

Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air CNN Live - YouTube
Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air Lemon held up a Confederate flag first before holding up the sign. He asked, ...

Hazelwood coal mine fire: Morwell residents displaying symptoms similar to cigarette smokers, expert ...
An expert says some locals near Victoria's Hazelwood mine fire have symptoms similar to cigarette smokers.

Police accused of displaying fake G20 weapons
Toronto's top police officer misled the public by displaying fake weapons used in a medieval-themed role-playing game to help justify their actions ...

No charges for U.S. host for displaying high-capacity magazine on TV
NBC television journalist David Gregory won't face charges for displaying a high-capacity ammunition magazine on his "Meet the Press" news program ...

Jays' Escobar suspended three games for displaying slur
Toronto Blue Jays shortstop Yunel Escobar has been suspended three games for displaying a homophobic slur on his eye-black during a game on Saturday. ...

Google Play Store now displaying age-based ratings
We reported back in May that Google was adding age-based ratings to all apps in the Play Store as determined by the International Age Rating ...

Apple displaying Ferraris & other cars at WWDC hinting at CarPlay announcements
... 2014 Filed under: AAPL Company , iOS Continue reading more about AAPL Company and iOS at 9to5Mac . What do you think? Discuss "Apple displaying ...

Resources last updated: 2/27/2016 1:05:01 PM