|
仔细看一下,其实可以直接更新的,不用过渡表。
- Private Sub Make_Data_Click()
- Dim strSQL As String
- Dim ctl As Control
- Dim i As Integer, j As Integer
- Dim strA As String, strB As String
- For i = 1 To 33
- strA = "红" & i & "= " & i
- Me.Controls("红" & i) = DCount("红" & i, "中奖号码分布", strA)
- Next
- For j = 1 To 16
- strB = "蓝" & j & "= " & j
- Me.Controls("蓝" & j) = DCount("蓝" & j, "中奖号码分布", strB)
- Next
- Me!huizong = "历史纪录共有" & DCount("开奖期号", "中奖号码分布") & "期!!!"
- For Each ctl In Me.Controls
- If Len(ctl.Name) <= 3 Then
- strSQL = "update 汇总表 set 中奖次数=" & ctl & " where 号码='" & ctl.Name & "'"
- CurrentDb.Execute strSQL
- End If
- Next
- End Sub
复制代码
[ 本帖最后由 Henry D. Sy 于 2008-12-8 14:01 编辑 ] |
|