最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

【倒計(jì)時(shí)程序】【登錄窗體記住賬號(hào)】【多選題】

2022-10-27 10:22 作者:凌霄百科  | 我要投稿

倒計(jì)時(shí)程序

Private Sub Form_Load()

Me.當(dāng)前日期 = Date

End Sub

Private Sub Form_Timer()

If Me.日期 <> "" Then

Dim datetext As Date

If datetext <> Me.日期 Then

? ?datetext = Me.日期

? ?Call 計(jì)算倒計(jì)時(shí)

End If

Else

Me.剩余天數(shù) = ""

Me.剩余星期 = ""

Me.剩余月份 = ""

End If

End Sub

Sub 計(jì)算倒計(jì)時(shí)()

Me.當(dāng)前日期 = Date

If Me.日期 <> "" Then

Me.剩余天數(shù) = DateDiff("d", Me.當(dāng)前日期, Me.日期)

Me.剩余星期 = DateDiff("w", Me.當(dāng)前日期, Me.日期)

Me.剩余月份 = DateDiff("m", Me.當(dāng)前日期, Me.日期)

End If

End Sub


登錄窗體記住賬號(hào)

Private Sub Command登錄_Click()

If 用戶名 <> "" And 密碼 <> "" Then

? ? If Me.密碼 = DLookup("密碼", "賬號(hào)密碼表", "用戶名='" & Me.用戶名 & "'") Then? ?'修改域函數(shù)參數(shù)

? ? ? ? MsgBox "登錄成功"


'===================================================================================記住賬號(hào)

If Me.記住賬號(hào) = True Then

'----------------記住該賬號(hào)并排序置頂

DoCmd.SetWarnings (False)

Dim indexnow As Long

Dim indexmax As Long

indexmax = Nz(DMax("排序", "用戶名表"), 0)

? ? If Nz(DCount("用戶名", "用戶名表", "用戶名='" & Me.用戶名 & "'"), 0) > 0 Then? ?'該用戶名存在

? ? ? ? indexnow = Nz(DLookup("排序", "用戶名表", "用戶名='" & Me.用戶名 & "'"), 0)

? ? ? ??

? ? ? ? If indexnow <> indexmax Then? ? '更新排序

? ? ? ? ? ? Dim update_sql As String

? ? ? ? ? ? update_sql = "Update 用戶名表 Set 排序=" & indexmax + 1 & "? Where? 用戶名='" & 用戶名 & "'"

? ? ? ? ? ? DoCmd.RunSQL update_sql

? ? ? ? End If

? ? Else? '該用戶名不存在需要添加

? ? ? ? Dim add_sql As String

? ? ? ? add_sql = "Insert Into 用戶名表 (用戶名,排序) Values ('" & 用戶名 & "', " & indexmax + 1 & " )"

? ? ? ? DoCmd.RunSQL add_sql

? ? End If

Else

'----------------刪除該賬號(hào)(不管是否記錄)

DoCmd.SetWarnings (False)

Dim del_sql As String

del_sql = "Delete From 用戶名表? Where? 用戶名= '" & Me.用戶名 & "'"

DoCmd.RunSQL del_sql

End If

'===================================================================================



'? ? ?DoCmd.OpenForm "系統(tǒng)主頁(yè)", acNormal, , "賬號(hào)='" & Me.賬號(hào) & "'"

'? ? ?DoCmd.Close acForm, Me.Name

? ? Else

? ? ? ? MsgBox "用戶名或密碼錯(cuò)誤"

? ? End If

Else

MsgBox "請(qǐng)輸入用戶名和密碼"

End If

End Sub


Private Sub Command退出_Click()

Application.Quit acQuitSaveAll

End Sub


Private Sub Form_Load()

Me.記住賬號(hào) = True

End Sub


多選題

Dim search_rs As DAO.Recordset

Dim A_Select As Boolean

Dim B_Select As Boolean

Dim C_Select As Boolean

Dim D_Select As Boolean


Private Sub Command確定_Click()

On Error Resume Next

If Me.CheckA = A_Select And Me.CheckB = B_Select And Me.CheckC = C_Select And Me.CheckD = D_Select Then

MsgBox "正確"

Else

Dim correcttext As String

If A_Select = True Then

correcttext = correcttext & " " & "A"

End If

If B_Select = True Then

correcttext = correcttext & " " & "B"

End If

If C_Select = True Then

correcttext = correcttext & " " & "C"

End If

If D_Select = True Then

correcttext = correcttext & " " & "D"

End If

MsgBox "錯(cuò)誤:" & correcttext

End If

search_rs.MoveNext

If search_rs.EOF = False Then

題目.Value = search_rs!題目.Value

TextA.Value = search_rs!A選項(xiàng).Value

A_Select = search_rs!A答案.Value

TextB.Value = search_rs!B選項(xiàng).Value

B_Select = search_rs!B答案.Value

TextC.Value = search_rs!C選項(xiàng).Value

C_Select = search_rs!C答案.Value

TextD.Value = search_rs!D選項(xiàng).Value

D_Select = search_rs!D答案.Value

Me.CheckA = False

Me.CheckB = False

Me.CheckC = False

Me.CheckD = False

Else

MsgBox "已到達(dá)最后記錄"

Exit Sub

End If

End Sub


Private Sub Form_Close()

On Error Resume Next

search_rs.Close

Set search_rs = Nothing

End Sub


Private Sub Form_Load()

Dim search_sql As String

search_sql = "Select * From 題目表"

Set search_rs = CurrentDb.OpenRecordset(search_sql, dbOpenDynaset)

If search_rs.EOF = False Then

題目.Value = search_rs!題目.Value

TextA.Value = search_rs!A選項(xiàng).Value

A_Select = search_rs!A答案.Value

TextB.Value = search_rs!B選項(xiàng).Value

B_Select = search_rs!B答案.Value

TextC.Value = search_rs!C選項(xiàng).Value

C_Select = search_rs!C答案.Value

TextD.Value = search_rs!D選項(xiàng).Value

D_Select = search_rs!D答案.Value

Me.CheckA = False

Me.CheckB = False

Me.CheckC = False

Me.CheckD = False

End If

End Sub



【倒計(jì)時(shí)程序】【登錄窗體記住賬號(hào)】【多選題】的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
司法| 和田市| 蒙阴县| 金门县| 拜城县| 黄龙县| 博乐市| 马龙县| 云南省| 天水市| 武陟县| 白城市| 建瓯市| 三台县| 淮南市| 玉环县| 浦县| 潼关县| 韶关市| 芷江| 米脂县| 霞浦县| 蕲春县| 新野县| 历史| 大兴区| 雅安市| 平果县| 钦州市| 通州市| 昌都县| 沙田区| 莲花县| 龙井市| 沅江市| 太仓市| 招远市| 衡南县| 孝义市| 博爱县| 阳新县|