|
-
Sep 14th, 2009, 02:41 PM
#1
Thread Starter
Member
Use of Function keys to display data
Dear Sir
I want to use function keys in my “Inventory Control System” software.
For example, I want to see the availability of Computer based on ref_no (ref_no does exist in a TextBox which is placed on my MDI form). Then if I press F2 or F3 or F4 …., that particular item i.e. Computer related with ref_no will be displayed on a DataGrid.
Please help me about the use of function keys to serve my purpose.
Appreciate, if you would come back at your earliest.
Regards
Pervez
Last edited by pervez; Sep 14th, 2009 at 02:43 PM.
Reason: Additional information
-
Sep 14th, 2009, 02:45 PM
#2
Thread Starter
Member
Re: Use of Function keys to display data
Dear Sir
I forgot to mention that I'm using VB6.0 and for database Access 2002.
Regards
Pervez
-
Sep 14th, 2009, 03:39 PM
#3
Re: Use of Function keys to display data
You can test which key is pressed in the textbox's KeyDown event.
Code:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF4
' do something
KeyCode = 0
Case VbKeyF3 Then
' do something else
KeyCode = 0
' etc
End Select
End Sub
Last edited by LaVolpe; Sep 14th, 2009 at 03:44 PM.
-
Sep 14th, 2009, 06:06 PM
#4
Thread Starter
Member
Re: Use of Function keys to display data
Dear Sir
I'm really greatful. It's working, thanks.
Regards
Pervez
-
Sep 14th, 2009, 08:00 PM
#5
Re: Use of Function keys to display data
Pervez, you are welcome.
If this is resolved, please mark it resolved. Use the "Thread Tools" dropdown menu near the top of your first posting above.
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
|