-
On Screen Keyboard (MS Access 2000-2003)
Hi everyone,
Hope someone can help me out with this one. I have created a form that has a text box on the top of the form, a data list in the middle and a set of command buttons on the bottom. The command buttons are organized much like a regular keyboard. Each command button has a letter (a-z). The form is not linked to any table or query. The data list is linked to a table of city names. The idea is as follows:
When the text box at the top of the form is blank (null or no information), the data list will display all city names in the table. If i want to narrow down the list I can click on a command button with the letter I want, for example, if i click on the command button labeled "s" then that same letter will appear in the text box, the data list will then be re-queried and only the city names starting with the letter "s" will appear.
That part i have working fine, the problem comes in when i want to append a letter. If I click on any of the other command buttons, the previous letter chosen gets replaced by the new letter being selected. What I would like to know is how to append a letter without deleting what is already there. The code I am using is as follows: The text box at the top is labled "SearchBox1" the data list is labled "DataList1". Thanks, any help would greatly be appreciated.
Private Sub K01_Click()
[SearchBox1] = "A"
DoCmd.Requery "DataList1"
End Sub
-
SearchBox1 = SearchBox1 + "A"
This will add the requested letter. The way you had it, just set the text field to the requested letter, thus it was always a direct replacement.
-
Originally Posted by GolferGuy
SearchBox1 = SearchBox1 + "A"
This will add the requested letter. The way you had it, just set the text field to the requested letter, thus it was always a direct replacement.
awsome!, thank you so much for the info. How would i backspace if i accidentally select the wrong text?
-
SearchBox1 = Left(SearchBox1, Len(SearchBox1) - 1)
-
Originally Posted by GolferGuy
SearchBox1 = Left(SearchBox1, Len(SearchBox1) - 1)
Thank you so so much. You have no idea how much you have helped me.
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
|
|