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 |