|
4#
楼主 |
发表于 2012-9-30 13:52:28
|
只看该作者
Private Sub µ±Ç°Íø¸ñ×ø±êÕûÀíºóдÈ뵱ǰÍø¸ñ×ø±ê±í2()
Dim Sxjl() As ReXYH
Dim TempX, TempY, TempH As Double
Dim TempID As Long
Dim TempS As String
Dim i, ii As Long
'On Error Resume Next
Set Rst01 = Me.²âÁ¿³É¹û±í_×Ó´°Ìå.Form.RecordsetClone
Rst01.MoveFirst
For i = 0 To Rst01.RecordCount - 1
TempID = Rst01.Fields("ID").Value
TempS = Rst01.Fields("µãºÅ").Value
TempX = Rst01.Fields("±±×ø±ê").Value
TempY = Rst01.Fields("¶«×ø±ê").Value
TempH = Rst01.Fields("¸ß³Ì").Value
If InStr(Format(TempY, "0.000"), ".") = 9 Then
TempY = TempY - TYdh01 * 1000000
Rst01.Edit
Rst01.Fields("¶«×ø±ê").Value = Rst01.Fields("¶«×ø±ê").Value - TYdh01 * 1000000
End If
Sql = "insert into ת»»Ç°Íø¸ñ×ø±êÁÙʱ±í (Êý¾ÝID,ÏîÄ¿ID,µãºÅ,±±×ø±ê,¶«×ø±ê,¸ß³Ì) values " _
& "(" & str(TempID) & "," & str(XmID) & ",'" & TempS & "'," & Format(TempX, "0.0000") _
& "," & Format(TempY, "0.0000") & "," & Format(TempH, "0.000") & ")"
DoCmd.RunSQL Sql
Rst01.MoveNext
Next i
²âÁ¿³É¹û±í_×Ó´°Ìå.Requery
End Sub
有乱码没办法 看懂我的意思了吗? |
|