استخدم هذا الكود ....
Option Compare Database
Dim dblStart As Double
Dim dblEnd As Double
Dim dblTime As Double
Private Sub txtTest_Change()
If Len(txtTest.Text) <= 1 Then
dblStart = Timer
Else
dblEnd = Timer
dblTime = Round(dblEnd - dblStart, 2)
If dblTime > 0.2 Then
txtTest = ""
MsgBox " عفوا ... لايمكن الإدخال إلا عن طريق قارئ الباركود"
End If
End If
End Sub