Dim Rsc As New ADODB.Recordset
Rsc.Open "select * from 表1", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
Do While Not Rsc.EOF
If Left(Rsc.Fields("字段1"), 1) = 1 Then
MsgBox Left(Rsc.Fields("字段1"), 7)
End If
If Left(Rsc.Fields("字段1"), 1) = 0 Then
MsgBox Left(Rsc.Fields("字段1"), 4)
End If
Rsc.MoveNext