Hello,
I have a database with a Listview control. When I start typing, I'd like to open a form that adds a new record, and have the letter I typed appear in a certain control, and then continue typing the word.
I tried using the keyup event to open my form, and pass the value of the key pressed with the openargs. I then used the following code on the onopen event of the form:
me.txtField = chr(OpenArgs)
I have two problems with doing it this way:
1) The letter I entered is highlighted, so if I were typing the word "First" I would get "irst". Also, if I type too fast, I'll only get "rst". What I want to happen is that I start to type the word "Fisrt". As I hit the "F" key, the form would open, F would be added to a certain field. As I continued to type the rest of the word, it would fill in after F. So, by typing the word "First," a form would open and First would be in a certain control in that form. Make sense?
2) I need to be able pass two values to the form when I open it - the value of the key pressed, and a foreign key value to the write to the new record. I only know how to pass one value with openargs.
Thanks,
Eric
I have a database with a Listview control. When I start typing, I'd like to open a form that adds a new record, and have the letter I typed appear in a certain control, and then continue typing the word.
I tried using the keyup event to open my form, and pass the value of the key pressed with the openargs. I then used the following code on the onopen event of the form:
me.txtField = chr(OpenArgs)
I have two problems with doing it this way:
1) The letter I entered is highlighted, so if I were typing the word "First" I would get "irst". Also, if I type too fast, I'll only get "rst". What I want to happen is that I start to type the word "Fisrt". As I hit the "F" key, the form would open, F would be added to a certain field. As I continued to type the rest of the word, it would fill in after F. So, by typing the word "First," a form would open and First would be in a certain control in that form. Make sense?
2) I need to be able pass two values to the form when I open it - the value of the key pressed, and a foreign key value to the write to the new record. I only know how to pass one value with openargs.
Thanks,
Eric