|
9#

楼主 |
发表于 2005-3-12 04:57:00
|
只看该作者
(123+123)*费率/100、[F1]+[F2]*费率/100、[F1]+[F2]+[F3]+[F4]、只要不是数值都不计算,不知为什么。我换台电脑也不计算。 再请帮看一下Private Sub 命令0_Click()
For I = 1 To DCount("*", "表1")
On Error Resume Next
Dim astr
Dim mdou As Double
Dim a
astr = Me![表1]![公式]
astr = Replace(astr, "费率", Me![表1]![费率])
astr = Replace(astr, "[F1]", DLookup("数值", "表1", "变量='[F1]'"))
astr = Replace(astr, "[F2]", DLookup("数值", "表1", "变量='[F2]'"))
astr = Replace(astr, "[F3]", DLookup("数值", "表1", "变量='[F3]'"))
astr = Replace(astr, "[F4]", DLookup("数值", "表1", "变量='[F4]'"))
astr = Replace(astr, "[F5]", DLookup("数值", "表1", "变量='[F5]'"))
astr = Replace(astr, "[F6]", DLookup("数值", "表1", "变量='[F6]'"))
astr = Replace(astr, "[F7]", DLookup("数值", "表1", "变量='[F7]'"))
astr = Replace(astr, "[F8]", DLookup("数值", "表1", "变量='[F8]'"))
astr = Replace(astr, "[F9]", DLookup("数值", "表1", "变量='[F9]'"))
astr = Replace(astr, "[F10]", DLookup("数值", "表1", "变量='[F10]'"))'MsgBox astr
Me![try].ControlSource = "=" & astr
'MsgBox Me![try]
Me![表1]![数值] = Me![try]
Me![try].ControlSource = 0
Me![表1].SetFocus
DoCmd.GoToRecord , , acNext
Next
End Sub |
|