M
Mark A. Sam
Hello,
I have set the preamble character of my barcode scanner to F5 so that in the
KeyDoen event, when the F5 is read, it sends the focus to a Textbox on the
main form, where [Input] is the textbox receiving the focus.
If KeyCode = vbKeyF5 Then
[Input]..Setfocus
End If
This works correctly on the Main form, but I also added similar code the the
Subform:
If KeyCode = vbKeyF5 Then
Parent.[Input]..Setfocus
End If
This fails when the barcode is scanned and the a subform control has the
focus. If the focus is on a Texbox, the scanned text will go into that
Textbox on the subform. But if I hit F5 when a subform control has the
focus, it works fine, and Parent.[Input] receives the focus.
Is there a way around this problem? Barcoding is new to me and I have
rarely used the Key events. It is difficult to debug becuase the events
don't fire after each character being scanned but after the whole scan is
received.
God Bless,
Mark A. Sam
I have set the preamble character of my barcode scanner to F5 so that in the
KeyDoen event, when the F5 is read, it sends the focus to a Textbox on the
main form, where [Input] is the textbox receiving the focus.
If KeyCode = vbKeyF5 Then
[Input]..Setfocus
End If
This works correctly on the Main form, but I also added similar code the the
Subform:
If KeyCode = vbKeyF5 Then
Parent.[Input]..Setfocus
End If
This fails when the barcode is scanned and the a subform control has the
focus. If the focus is on a Texbox, the scanned text will go into that
Textbox on the subform. But if I hit F5 when a subform control has the
focus, it works fine, and Parent.[Input] receives the focus.
Is there a way around this problem? Barcoding is new to me and I have
rarely used the Key events. It is difficult to debug becuase the events
don't fire after each character being scanned but after the whole scan is
received.
God Bless,
Mark A. Sam