|
-
Jun 13th, 2006, 12:11 AM
#1
Thread Starter
Member
Make textbox display dependent on listbox input
Hi All,
I have 2 fields, Language and Character in my table. Now i am designing a form for it. I am using a list box for all the language n a textbox for the character.
Wat i wan to achieve is as follows :
Whenever the user clicks on any of the language in the list box, its corresponding character will be displayed in the textbox. How can i achieve it? thks
FT
-
Jun 13th, 2006, 12:22 AM
#2
Hyperactive Member
Re: Make textbox display dependent on listbox input
how are you storing all of the available characters?
-
Jun 13th, 2006, 12:39 AM
#3
Thread Starter
Member
Re: Make textbox display dependent on listbox input
the available chars are all stored in the table.. i m trying to write a query, n assign the result of the query to the texbox but to no avail..
-
Jun 13th, 2006, 12:48 AM
#4
Hyperactive Member
Re: Make textbox display dependent on listbox input
not sure what you mean by table...
but using an array of chars named arrChars()
' in list1_click
txtChar=arrChars(list1.listindex)
-
Jun 13th, 2006, 12:55 AM
#5
Thread Starter
Member
Re: Make textbox display dependent on listbox input
 Originally Posted by rnd me
not sure what you mean by table...
but using an array of chars named arrChars()
' in list1_click
txtChar=arrChars(list1.listindex)
sorry for the confusion, i am using VBA in fact... tat is i have a table to store the 2 fields, language n character...
Whenever the user clicks on any of the language in the list box, its corresponding character will be displayed in the textbox. How can i achieve it? thks
-
Jun 13th, 2006, 06:01 AM
#6
Re: Make textbox display dependent on listbox input
 Originally Posted by fulltime
sorry for the confusion, i am using VBA in fact
Moved to Office Development.
-
Jun 13th, 2006, 05:14 PM
#7
Re: Make textbox display dependent on listbox input
You have 1 character per language? The table has 2 fields, Language and Character?
VB Code:
"Select Character From <your tablename> Where Language = '" & listbox.text & "'"
After you execute the select statement, the character you want is in the recordset.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jun 14th, 2006, 02:45 AM
#8
Thread Starter
Member
Re: Make textbox display dependent on listbox input
 Originally Posted by Al42
You have 1 character per language? The table has 2 fields, Language and Character?
VB Code:
"Select Character From <your tablename> Where Language = '" & listbox.text & "'"
After you execute the select statement, the character you want is in the recordset.
ok thks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|