Private Sub Command1_Click()
Dim STemp As String
STemp = "UPDATE 表1 SET C = Mid(号码,1,1), D = Mid(号码,2,1), E = Mid(号码,3,1), F = Mid(号码,4,1), G = Mid(号码,5,1), H = Mid(号码,6,1)"
DoCmd.RunSQL STemp
End Sub
Private Sub Command0_Click()
Dim i As Integer
Dim STemp As String
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
STemp = "Select * From 表1"
rs.Open STemp, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
For i = 1 To rs.RecordCount
DoCmd.SetWarnings False
STemp = "update 表1 set A=left(A,2)&mid(号码,1,6)&right(A,13)"
DoCmd.RunSQL STemp
Next i
End Sub