Hello,
I want to scan 2 labels with a barcode reader and check if they have the same code.
I have 2 fields to where i scan the 2 labels, first i scan label 1 in field 1, with the event "Private Sub LBL1_AfterUpdate()" i write a text to an info field 'scan label 2' then i set the focus to label 2, then i also scan this label 2 in field 2. I compare the 2 barcodes and when they are identical i want to write a text to the info field 'Labels identical' this text must hold for 1 second in the infofield and then the text in infofield has to change to 'Scan label 1'.
The problem now is that i don't see the first text 'Label identical' but after 1 sec it shows the text 'Scan label 1'
Why does the text not appear
Thanks in advance.
Bieke
This is my code:
Private Sub LBL1_AfterUpdate()
LBL2.SetFocus
[Info] = "Scan Label 2"
End Sub
Private Sub LBL2_AfterUpdate()
If LBL1 = LBL2 Then
[Info] = "Labels identical!"
Sleep 1000
[Info] = "Scan Label 1"
Else
[Info] = "Labels NOT identical!"
Sleep 1000
[Info] = "Scan Label 1"
End If
End Sub
I want to scan 2 labels with a barcode reader and check if they have the same code.
I have 2 fields to where i scan the 2 labels, first i scan label 1 in field 1, with the event "Private Sub LBL1_AfterUpdate()" i write a text to an info field 'scan label 2' then i set the focus to label 2, then i also scan this label 2 in field 2. I compare the 2 barcodes and when they are identical i want to write a text to the info field 'Labels identical' this text must hold for 1 second in the infofield and then the text in infofield has to change to 'Scan label 1'.
The problem now is that i don't see the first text 'Label identical' but after 1 sec it shows the text 'Scan label 1'
Why does the text not appear
Thanks in advance.
Bieke
This is my code:
Private Sub LBL1_AfterUpdate()
LBL2.SetFocus
[Info] = "Scan Label 2"
End Sub
Private Sub LBL2_AfterUpdate()
If LBL1 = LBL2 Then
[Info] = "Labels identical!"
Sleep 1000
[Info] = "Scan Label 1"
Else
[Info] = "Labels NOT identical!"
Sleep 1000
[Info] = "Scan Label 1"
End If
End Sub