bruceblack
Registered User.
- Local time
- Today, 11:45
- Joined
- Jun 30, 2017
- Messages
- 119
Hi folks! This is kind of an odd one that doesnt make much sense to me.
Please help!
So i have a form with some fields.
I'm using a barcode scanner to put in the values from the barcodes.
This WORKS for all my fields except for 1 which has code on after update event.
But i can't seem to figure out how to fix it. SetFocus wont work either.
Also the enter key behaviour is set to default.
CODE:
Sub article_afterupdate()
vVal = DLookup("[location]", "import_cyclecountTXT", "[location]='" & article & "'") 'lookup item
If IsNull(vVal) Then
'do nothing
Else
location.Value = article
Me.article = Null
Me.partij.SetFocus
Me.article.SetFocus
End If
End Sub
I just want it to go to the next field after entering normal data with the scanner. But instead, it enters the data, highlights it, and stays on the same control.
What is going on here?
Please help!
So i have a form with some fields.
I'm using a barcode scanner to put in the values from the barcodes.
This WORKS for all my fields except for 1 which has code on after update event.
But i can't seem to figure out how to fix it. SetFocus wont work either.
Also the enter key behaviour is set to default.
CODE:
Sub article_afterupdate()
vVal = DLookup("[location]", "import_cyclecountTXT", "[location]='" & article & "'") 'lookup item
If IsNull(vVal) Then
'do nothing
Else
location.Value = article
Me.article = Null
Me.partij.SetFocus
Me.article.SetFocus
End If
End Sub
I just want it to go to the next field after entering normal data with the scanner. But instead, it enters the data, highlights it, and stays on the same control.
What is going on here?