回覆列表
  • 1 # 午夜雨666

    If IsNull(Me![name]) Then

    MsgBox "請選擇用登入使用者!", 64, "系統提示"

    Me![name].SetFocus

    Else

    If IsNull(Me![password]) Then

    MsgBox "請輸入密碼,密碼不能為空!", 64, "系統提示"

    Me![password].SetFocus

    Else

    Dim stemp As String

    Dim rs As ADODB.Recordset

    Set rs = New ADODB.Recordset

    stemp = "select * from 使用者表 where 使用者名稱="" & Me![name] & """

    rs.Open stemp, CurrentProject.Connection, adOpenKeyset, adLockOptimistic

    If rs("密碼") <> Me![password] Then

    MsgBox "密碼錯誤,請重新輸入!", vbOKOnly, "系統提示"

    Me![password] = ""

    Me![password].SetFocus

    Else

    DoCmd.Close

    DoCmd.OpenForm "主選單"

    End If

    End If

    End If

  • 中秋節和大豐收的關聯?
  • 血毒是什麼,由什麼原因引起呢?血毒是什麼?