If CodeFlag = True And UIDflag = False AndAreaFlag = False Then
If CheckIfUID(TextInput) = True Then '是不是22位ID
With FrmMain.AdoSyn
.RecordSource ="select * from testresult3 where info2 = '" & TextInput &"'"
.Refresh
If .Recordset.RecordCount<> 0 Then
TextUID = TextInput
Call GetMatNo(TextUID,MatNo)
LblMaterial.Caption ="正在操作物料号" & MatNo
TextNumber =GetAmount(MatNo, TextUID)
UIDflag = True
Else
MsgBox "库中没有此UID"
End If
End With
End If
End If
If CheckIfUID(TextInput) = True Then '是不是22位ID
With FrmMain.AdoSyn
.RecordSource ="select * from testresult3 where info2 = '" & TextInput &"'"
.Refresh
If .Recordset.RecordCount<> 0 Then
TextUID = TextInput
Call GetMatNo(TextUID,MatNo)
LblMaterial.Caption ="正在操作物料号" & MatNo
TextNumber =GetAmount(MatNo, TextUID)
UIDflag = True
Else
MsgBox "库中没有此UID"
End If
End With
End If
End If