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
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
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
Re: Use of Function keys to display data
Dear Sir
I'm really greatful. It's working, thanks.
Regards
Pervez
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.