海信家电”换帅 “ 高玉玲接替代慧忠出任新任董事长
2024-11-22
DoCmd.SetWarnings False DoCmd.OpenQuery "删除对奖票号", acNormal, acEdit DoCmd.OpenQuery "追加对奖票号", acNormal, acEdit DoCmd.SetWarnings True Set qrs = CurrentDb.OpenRecordset("对奖票号") qrs.MoveFirst i = 1 Do While Not qrs.EOF qrs.Edit qrs!序号 = Int((211 - 1) * Rnd) qrs!对奖号码 = i qrs.Update i = i + 1 qrs.MoveNext Loop MsgBox ("对奖名单初始化完毕。") qrs.Close |
…… If Me!奖励等级.Value = 1 Then Me!总数量.Value = 10 End If If Me!奖励等级.Value = 2 Then Me!总数量.Value = 30 End If If Me!奖励等级.Value = 3 Then Me!总数量.Value = 50 End If Forms!抽奖.Q_抽奖统计.Requery If Me!奖励等级.Value = 1 Then Me!抽奖数量.Value = 5 End If If Me!奖励等级.Value = 2 Or Me!奖励等级.Value = 3 Then Me!抽奖数量.Value = 10 End If …… |
…… N = 0 cnt = Me!电科.Value + Me!电气.Value + Me!自动化.Value + Me!通信.Value + Me!院办.Value + Me!退休.Value Do While Me!抽奖数量.Value > N And Not qrs.EOF And cnt < Me!总数量.Value '电科抽奖 ’四舍五入确定电科中奖数 #p#分页标题#e# If Me!电科.Value < (Int(((unit1.姓名之Count / cnt1) * Me!总数量.Value + 0.5))) And N < Me!抽奖数量.Value And cnt < Me!总数量.Value Then If qrs.单位 = "电科" And qrs!批次.Value = 0 Then Me!电科.Value = Me!电科.Value + 1 qrs.Edit qrs!奖励等级.Value = Me!奖励等级.Value qrs!批次.Value = Me!批次.Value qrs.Update N = N + 1 End If Else End If …… '退休抽奖 cnt = Me!电科.Value + Me!电气.Value + Me!自动化.Value + Me!通信.Value + Me!院办.Value + Me!退休.Value cnt2= Me!电科.Value + Me!电气.Value + Me!自动化.Value + Me!通信.Value + Me!院办.Value '剩余数量分配给退休 If Me!退休.Value < Int((Me!总数量.Value – cnt2) And N < Me!抽奖数量.Value And cnt < Me!总数量.Value Then If qrs22.单位 = "退休" And qrs!批次.Value = 0 Then Me!退休.Value = Me!退休.Value + 1 qrs.Edit qrs22!奖励等级.Value = Me!奖励等级.Value qrs22!批次.Value = Me!批次.Value qrs22.Update N = N + 1 End If Else End If …… ’判断是否完成抽奖 cnt = Me!电科.Value + Me!电气.Value + Me!自动化.Value + Me!通信.Value + Me!院办.Value + Me!退休.Value If cnt = Me!总数量.Value Then MsgBox ("抽奖总数已到。") Me.可抽奖.Value = 0 Else MsgBox ("抽奖限制。") End If …… |
评论 {{userinfo.comments}}
{{child.content}}
{{question.question}}
提交