www.pudn.com > 数据库作业.rar > dlxx.frm


VERSION 5.00 
Begin VB.Form dlxx  
   BorderStyle     =   1  'Fixed Single 
   Caption         =   "登录" 
   ClientHeight    =   1725 
   ClientLeft      =   45 
   ClientTop       =   330 
   ClientWidth     =   4095 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   Moveable        =   0   'False 
   ScaleHeight     =   1725 
   ScaleWidth      =   4095 
   StartUpPosition =   2  '屏幕中心 
   Begin VB.Data Data1  
      Caption         =   "Data1" 
      Connect         =   "Access" 
      DatabaseName    =   "医药信息管理系统.mdb" 
      DefaultCursorType=   0  '缺省游标 
      DefaultType     =   2  '使用 ODBC 
      Exclusive       =   0   'False 
      Height          =   285 
      Left            =   1320 
      Options         =   0 
      ReadOnly        =   0   'False 
      RecordsetType   =   1  'Dynaset 
      RecordSource    =   "用户" 
      Top             =   0 
      Visible         =   0   'False 
      Width           =   1215 
   End 
   Begin VB.CommandButton Comcancel  
      Caption         =   "取消" 
      Height          =   495 
      Left            =   2520 
      TabIndex        =   4 
      Top             =   960 
      Width           =   1215 
   End 
   Begin VB.CommandButton Comok  
      Caption         =   "确定" 
      Height          =   495 
      Left            =   2520 
      TabIndex        =   0 
      Top             =   360 
      Width           =   1215 
   End 
   Begin VB.TextBox Text2  
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   12 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   390 
      IMEMode         =   3  'DISABLE 
      Left            =   960 
      PasswordChar    =   "*" 
      TabIndex        =   3 
      Top             =   960 
      Width           =   1455 
   End 
   Begin VB.TextBox Text1  
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   12 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   375 
      Left            =   960 
      TabIndex        =   1 
      Top             =   480 
      Width           =   1455 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "您好!" 
      Height          =   1455 
      Left            =   120 
      TabIndex        =   2 
      Top             =   120 
      Width           =   3855 
      Begin VB.Label Label2  
         Caption         =   "密码" 
         Height          =   255 
         Left            =   240 
         TabIndex        =   6 
         Top             =   960 
         Width           =   495 
      End 
      Begin VB.Label Label1  
         Caption         =   "用户名" 
         Height          =   255 
         Left            =   240 
         TabIndex        =   5 
         Top             =   480 
         Width           =   615 
      End 
   End 
End 
Attribute VB_Name = "dlxx" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Private Sub Comcancel_Click() 
    Unload Me 
End Sub 
 
Private Sub Comok_Click() 
    Data1.Recordset.FindFirst "账号='" & Text1.Text & "'" 
    If Data1.Recordset.NoMatch Then 
        MsgBox ("该输入正确的用户名"), 16, ("错误") 
        Text1.Text = "" 
    ElseIf Data1.Recordset("密码") = Text2.Text Then 
        csxx.Show 
        Unload Me 
        Else 
            MsgBox ("密码错误"), 16, ("错误") 
            Text2.Text = "" 
    End If 
End Sub