"Strider" <jf_cantley@empowered.com> wrote:
>check out
>
>http://msdn.microsoft.com/library/of...deConstants.ht
>m
>you need to use the keydown or keyup events
>
>jc
>Beginner-Brad <bradhouse@sprint.ca> wrote in message
>news:38d1015e$1@news.devx.com...
>>
>> Hi there,
>>
>> I am trying to find the ASCII code for the arrow keys located on the
>> keyboard.
>> My problem is this, the user comes to my dbcombo box and instead of using
>> his/her mouse, decides to use the down or up arrow keys on the keyboard.
>>
>> How can I write a code to recognize this keys on the keyboard? In my ASCII
>> character code set I do not see a code related to those keys. What can

I
>> do
>> about this problem? Any ideas?
>>
>> Here is my code so far:
>>
>> Private Sub dbcBoxCode_KeyPress(KeyAscii As Integer)
>>
>> KeyAscii = Asc(UCase(Chr(KeyAscii))) 'Change all keys pressed to

>UpperCase.
>>
>> 'If the key pressed is the ENTER KEY or a number from 0 through 9 and
>> letters
>> from A to Z, Allow it otherwise do not.
>> If (KeyAscii > 12 And KeyAscii < 14) Or (KeyAscii >= 48 And KeyAscii

<=
>> 90 And KeyAscii <> 61)) Then
>>
>> Dim db As Database
>> Dim rs As Recordset
>> txtBoxCodeDescription.Text = ""
>>
>> Set db = OpenDatabase(App.Path & "\Brad'sRecipeProject.mdb")
>>
>> If txtBoxCodeDescription.Text = "" Then
>>
>> Set rs = db.OpenRecordset("SELECT PackageName FROM Package WHERE
>> PackageNumber = '" & dbcBoxCode.Text & "'")
>>
>> If Not rs.EOF Then
>>
>> txtBoxCodeDescription.Text =

>rs.Fields("PackageName").Value
>>
>> Else
>>
>> txtBoxCodeDescription.Text = ""
>>
>> End If
>>
>> End If
>>
>> Set db = Nothing
>> Set rs = Nothing
>>
>> Else
>>
>> KeyAscii = 0
>>
>> End If
>>
>>
>> End Sub
>>
>> I have done this so far, but would rather NOT have the user have to hit

>two
>> keys to produce the final answer. Is there another way to detect the up

>and
>> down arrow keys on the keyboard?
>>
>> Thanks & have a great day!
>> Beginner-Brad....struggling with VB 6.0...8-(
>>
>>
>>
>>
>>

>
>