VERSION 5.00
Begin VB.Form Frmlogin 
   BackColor       =   &H00FF8080&
   Caption         =   "Login Form"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   WindowState     =   2  'Maximized
   Begin VB.Frame Frame1 
      BackColor       =   &H00FF8080&
      Caption         =   "System Login"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   3375
      Left            =   5160
      TabIndex        =   7
      Top             =   3480
      Width           =   4695
      Begin VB.ComboBox cbousername 
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "Comic Sans MS"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000002&
         Height          =   405
         ItemData        =   "Frmlogin.frx":0000
         Left            =   1560
         List            =   "Frmlogin.frx":0013
         Sorted          =   -1  'True
         TabIndex        =   1
         Top             =   1440
         Width           =   2800
      End
      Begin VB.TextBox txtPassword 
         BackColor       =   &H00FFFFFF&
         BeginProperty DataFormat 
            Type            =   1
            Format          =   "***"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   3081
            SubFormatType   =   0
         EndProperty
         BeginProperty Font 
            Name            =   "Comic Sans MS"
            Size            =   14.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000002&
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1560
         MaxLength       =   12
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   1920
         Width           =   2800
      End
      Begin VB.CommandButton cmdcancel 
         BackColor       =   &H00FFFFFF&
         Caption         =   "&Reset"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   3120
         Style           =   1  'Graphical
         TabIndex        =   4
         Top             =   2640
         UseMaskColor    =   -1  'True
         Width           =   1095
      End
      Begin VB.CommandButton cmdok 
         BackColor       =   &H00FFFFFF&
         Caption         =   "&OK"
         Default         =   -1  'True
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   1800
         MaskColor       =   &H00FF0000&
         Style           =   1  'Graphical
         TabIndex        =   3
         Top             =   2640
         UseMaskColor    =   -1  'True
         Width           =   1095
      End
      Begin VB.ComboBox cboworkgroup 
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "Comic Sans MS"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   435
         ItemData        =   "Frmlogin.frx":006C
         Left            =   1560
         List            =   "Frmlogin.frx":0073
         TabIndex        =   9
         Text            =   "Metropole Warehouse"
         Top             =   960
         Width           =   2805
      End
      Begin VB.CommandButton cmdclose 
         BackColor       =   &H00FFFFFF&
         Caption         =   "&Close"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   480
         MaskColor       =   &H00E0E0E0&
         Style           =   1  'Graphical
         TabIndex        =   5
         Top             =   2640
         Width           =   1095
      End
      Begin VB.ComboBox Combo1 
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "Comic Sans MS"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000002&
         Height          =   405
         ItemData        =   "Frmlogin.frx":008C
         Left            =   1560
         List            =   "Frmlogin.frx":00AE
         Locked          =   -1  'True
         Sorted          =   -1  'True
         TabIndex        =   8
         Text            =   "MAHARASHTRA & GOA"
         Top             =   480
         Width           =   2800
      End
      Begin VB.Label Label3 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         BackColor       =   &H00FF8080&
         Caption         =   "User Name"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   240
         Left            =   210
         TabIndex        =   13
         Top             =   1560
         Width           =   1185
      End
      Begin VB.Label Label4 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         BackColor       =   &H00FF8080&
         Caption         =   "Password"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   240
         Left            =   240
         TabIndex        =   12
         Top             =   2040
         Width           =   1035
      End
      Begin VB.Label Label5 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         BackColor       =   &H00FF8080&
         Caption         =   "Workgroup"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   240
         Left            =   240
         TabIndex        =   11
         Top             =   1080
         Width           =   1155
      End
      Begin VB.Label Label6 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         BackColor       =   &H00FF8080&
         Caption         =   "Circle Name"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   240
         Left            =   195
         TabIndex        =   10
         Top             =   600
         Width           =   1290
      End
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H0080FFFF&
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   27.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   615
      Left            =   5280
      TabIndex        =   6
      Text            =   "!"
      Top             =   0
      Width           =   195
   End
   Begin VB.Image Image1 
      Height          =   1575
      Left            =   480
      Picture         =   "Frmlogin.frx":013B
      Top             =   1920
      Width           =   2715
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackColor       =   &H00FF8080&
      Caption         =   "Prepaid"
      BeginProperty Font 
         Name            =   "Comic Sans MS"
         Size            =   26.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   735
      Left            =   6600
      TabIndex        =   17
      Top             =   2160
      Width           =   1845
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      BackColor       =   &H00FF8080&
      Caption         =   "i"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   36
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   735
      Left            =   6360
      TabIndex        =   0
      Top             =   2100
      Width           =   195
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      BackColor       =   &H00FF8080&
      Caption         =   "An idea can change your life..........."
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   240
      Left            =   240
      TabIndex        =   16
      Top             =   3600
      Width           =   3615
   End
   Begin VB.Label Label9 
      Alignment       =   2  'Center
      BackColor       =   &H0000FFFF&
      Caption         =   "DEA Cellular Ltd"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   27.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   795
      Left            =   0
      TabIndex        =   15
      Top             =   0
      Width           =   15255
   End
   Begin VB.Label Label1 
      BackColor       =   &H0000FF00&
      BeginProperty Font 
         Name            =   "Comic Sans MS"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   195
      Left            =   0
      TabIndex        =   14
      Top             =   900
      Width           =   15255
   End
   Begin VB.Line Line1 
      BorderWidth     =   5
      X1              =   0
      X2              =   0
      Y1              =   0
      Y2              =   11040
   End
   Begin VB.Line Line2 
      BorderWidth     =   5
      X1              =   0
      X2              =   15240
      Y1              =   9840
      Y2              =   9840
   End
   Begin VB.Image Image2 
      Height          =   780
      Left            =   4440
      Picture         =   "Frmlogin.frx":E09D
      Top             =   3600
      Width           =   720
   End
End
Attribute VB_Name = "Frmlogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public rstat As String, delstr As String, Rowflag As String, Flag As String
Private Sub cmdCancel_Click()
cbousername = ""
txtPassword = ""
cboworkgroup = ""
cboworkgroup.SetFocus
End Sub
Private Sub cmdclose_Click()
Unload Me
'MDImain.Picture1.Visible = True
'MDImain.idea.Visible = True
End Sub


Private Sub cmdOK_Click()
Dim CnDb As New ADODB.Connection
Set CnDb = New ADODB.Connection
CnDb.Open "Provider = Microsoft.Jet.OleDB.4.0;Data Source = C:\Program Files\Microsoft Visual Studio\VB98\Prepaid Management System\Login.mdb"

Dim rsUser As ADODB.Recordset
Dim sSQL As String
Set rsUser = New ADODB.Recordset

sSQL = "Select * From Userlogin Where User_name = '" & cbousername.Text & "' And User_password = '" & txtPassword.Text & "' And Workgroup = '" & cboworkgroup.Text & "'"
rsUser.Open sSQL, CnDb
If rsUser.EOF Then
   MsgBox " Password Entered is Invalid.......Try again!!!!", vbOKCancel
   txtPassword = ""
   txtPassword.SetFocus
Else
  Frmlogin.Hide
  'MDImain.Picture1.Visible = True
  'MDImain.idea.Visible = True
' MDImain.Toolbar1.Enabled = True
  MDImain.StatusBar1.Panels(3).Text = cbousername.Text
  MDImain.StatusBar1.Panels(4).Text = cboworkgroup.Text
  Call MsgBox("Welcome to World of Prepaid...  ", vbOKOnly + vbInformation + vbApplicationModal + vbDefaultButton1, "Welcome")
  
End If
End Sub


