Book Shop
Private Sub addmmission_Click()
Form6.Show End Sub Private Sub Addnewbook_Click() Form24.Show End Sub Private Sub addnewuser_Click() adduser.Show End Sub Private Sub admiss_Click() Form14.Show End Sub Private Sub admissi_Click() Form10.Show End Sub Private Sub admissio_Click() Form4.Show End Sub Private Sub book_Click() Form18.Show End Sub Private Sub BookIssue_Click() Form2.Show End Sub Private Sub BookRetun_Click() Form34.Show End Sub Private Sub changepassword_Click() changepass.Show End Sub Private Sub DeleteBook_Click() Form29.Show End Sub Private Sub dhdh_Click() Form21.Show End Sub Private Sub dhdhy_Click() Form20.Show End Sub Private Sub enqu_Click() Form13.Show End Sub Private Sub enqui_Click() Form9.Show End Sub Private Sub enquiry_Click() Form1.Show End Sub Private Sub exam_Click() Form17.Show End Sub Private Sub exam3_Click() Form31.Show End Sub Private Sub exit_Click() Unload Me End Sub Private Sub kdjh_Click() Form7.Show End Sub Private Sub kooB_Click() Form26.Show End Sub Private Sub liab_Click() Form16.Show End Sub Private Sub liaba_Click() Form12.Show End Sub Private Sub liabary_Click() Form2.Show End Sub Private Sub maxe_Click() Form23.Show End Sub Private Sub MDIForm_Load() 'Image1.Width = MDIForm1.Width 'Image1.Height = MDIForm1.Height 'Picture1.Width = MDIForm1.Width 'Picture1.Width = MDIForm1.Height End Sub Private Sub MDIForm_Resize() 'Image1.Width = MDIForm1.Width 'Image1.Height = MDIForm1.Height End Sub Private Sub Modifybookdetails_Click() Form25.Show End Sub Private Sub parti_Click() Form32.Show End Sub Private Sub particu_Click() Form28.Show End Sub Private Sub particulars_Click() Form19.Show End Sub Private Sub Paymentofdues_Click() Form35.Show End Sub Private Sub poilku_Click() Form30.Show End Sub Private Sub porj_Click() Form5.Show End Sub Private Sub recei_Click() Form15.Show End Sub Private Sub receipt_Click() Form3.Show End Sub Private Sub uydsy_Click() Form22.Show End Sub Private Sub wew_Click() Form11.Show End Sub Private Sub wrw_Click() Form8.Show End Sub Private Sub Command1_Click() MonthView1.Visible = True End Sub Private Sub Command1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text21.SetFocus End If End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Command3_Click() If Text1.Text = "" Then MsgBox "Please input the field" Text1.SetFocus Else Data1.Recordset.AddNew Data1.Recordset.Fields(0) = Label48.Caption Data1.Recordset.Fields(1) = Text1.Text Data1.Recordset.Fields(2) = Text2.Text Data1.Recordset.Fields(3) = Text3.Text Data1.Recordset.Fields(4) = Text4.Text Data1.Recordset.Fields(5) = Text5.Text Data1.Recordset.Fields(6) = Text6.Text + Text7.Text Data1.Recordset.Fields(7) = Text8.Text Data1.Recordset.Fields(8) = Text9.Text + Text10.Text Data1.Recordset.Fields(9) = Text11.Text Data1.Recordset.Fields(10) = Text12.Text Data1.Recordset.Fields(11) = Text13.Text Data1.Recordset.Fields(12) = Text14.Text 'Data1.Recordset.Fields(13) = Text15(0).Text 'Data1.Recordset.Fields(14) = Text16(0).Text 'Data1.Recordset.Fields(15) = Text17(0).Text 'Data1.Recordset.Fields(16) = Text18(0).Text Data1.Recordset.Fields(17) = Text19.Text Data1.Recordset.Fields(18) = Text20.Text Data1.Recordset.Fields(19) = Text21.Text Data1.Recordset.Fields(20) = Text22.Text Data1.Recordset.Fields(21) = Text23.Text Data1.Recordset.Fields(22) = CommonDialog1.FileName Data1.Recordset.Update MsgBox "record updated" Unload Me Form4.Show End If End Sub Private Sub Command4_Click() CommonDialog1.ShowOpen Image1 = LoadPicture(CommonDialog1.FileName) End Sub Private Sub exit_Click() Unload Me End Sub Private Sub Form_Load() Text19 = Date Data1.DatabaseName = App.Path & "\B-tek.mdb" Data1.RecordSource = "select * from admission" Data1.Refresh If Data1.Recordset.EOF = True Then Label48 = "1" Else Data1.Recordset.MoveLast Label48 = Data1.Recordset.Fields(0).Value + 1 End If End Sub Private Sub MonthView1_DateClick(ByVal DateClicked As Date) Text19 = Str(MonthView1.Month) & "/" & Str(MonthView1.Day) & "/" & Str(MonthView1.Year) MonthView1.Visible = False End Sub Private Sub text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text2.SetFocus End If End Sub Private Sub Text10_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text11.SetFocus End If End Sub Private Sub Text11_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text12.SetFocus End If End Sub Private Sub Text12_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text13.SetFocus End If End Sub Private Sub Text13_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text14.SetFocus End If End Sub 'Private Sub Text14_KeyDown(KeyCode As Integer, Shift As Integer) 'If KeyCode = 13 Then 'Text15(0).SetFocus 'End If 'End Sub Private Sub Text15_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text16(0).SetFocus End If End Sub Private Sub Text16_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text17(0).SetFocus End If End Sub Private Sub Text17_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text18(0).SetFocus End If End Sub Private Sub Text18_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Command1.SetFocus End If End Sub Private Sub text2_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text3.SetFocus End If End Sub Private Sub Text20_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Command3.SetFocus End If End Sub Private Sub Text21_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text22.SetFocus End If End Sub Private Sub Text22_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text23.SetFocus End If End Sub Private Sub Text23_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text20.SetFocus End If End Sub Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text4.SetFocus End If End Sub Private Sub text4_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text5.SetFocus End If End Sub Private Sub text5_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text6.SetFocus End If End Sub Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text7.SetFocus End If End Sub Private Sub Text7_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text8.SetFocus End If End Sub Private Sub Text8_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text9.SetFocus End If End Sub Private Sub Text9_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text10.SetFocus End If End Sub Private Sub Timer1_Timer() Label50.Caption = Time End Sub Dim ss As String Dim i, j As Integer Private Sub Combo1_Change() 'Combo1_Click End Sub Private Sub Combo1_Click() For i = 0 To List1.Count - 1 List1(i).Clear Next Data1.RecordSource = "Select * from receipt where RegNo='" & Combo1.Text & "'" Data1.RecordSource = "Select " + ss + " from receipt where RegNo='" & Combo1.Text & "'" Data1.Refresh If Not Data1.Recordset.EOF Then While Not Data1.Recordset.EOF For i = 0 To List1.Count - 1 If Len(Data1.Recordset.Fields(i)) > 0 Then List1(i).AddItem Data1.Recordset.Fields(i) Else List1(i).AddItem " " End If Next Data1.Recordset.MoveNext Wend Else MsgBox "Sorry No record" End If End Sub Private Sub Combo1_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Combo1_Click End If End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub exit_Click() Unload Me End Sub Private Sub Form_Load() Data1.DatabaseName = App.Path & "\B-tek.mdb" Data1.RecordSource = "select distinct regno from receipt" Data1.Refresh If Not Data1.Recordset.EOF Then Data1.Recordset.MoveFirst While Not Data1.Recordset.EOF Combo1.AddItem Data1.Recordset.Fields(0) Data1.Recordset.MoveNext Wend End If Data1.RecordSource = "select * from receipt" Data1.Refresh ss = "" ss = ss + Data1.Recordset.Fields(0).Name + "," ss = ss + Data1.Recordset.Fields(1).Name + "," ss = ss + Data1.Recordset.Fields(3).Name + "," ss = ss + Data1.Recordset.Fields(4).Name + "," ss = ss + Data1.Recordset.Fields(5).Name + "," ss = ss + Data1.Recordset.Fields(6).Name + "," ss = ss + Data1.Recordset.Fields(7).Name 'ss = ss + Data1.Recordset.Fields(8).Name Data1.RecordSource = "select " + ss + " from receipt" Data1.Refresh For i = 0 To Label3.Count - 1 Label3(i) = Data1.Recordset.Fields(i).Name Next End Sub Private Sub List1_Click(Index As Integer) j = List1(Index).ListIndex For i = 0 To List1.Count - 1 List1(i).ListIndex = j Next End Sub Dim i As Integer Private Sub sujit() i = 0 Data1.RecordSource = "Select Date, Cheque_no,NextDate,Pay_mode,RS,Signature from receipt where RegNo='" & Combo1.Text & "'" Data1.Refresh If Not Data1.Recordset.EOF Then If Len(Data1.Recordset.Fields(0)) > 0 Then Text1(i).Text = Data1.Recordset.Fields(0) End If If Len(Data1.Recordset.Fields(1)) > 0 Then Text3(i).Text = Data1.Recordset.Fields(1) End If If Len(Data1.Recordset.Fields(2)) > 0 Then Text2(i).Text = Data1.Recordset.Fields(2) End If If Len(Data1.Recordset.Fields(3)) > 0 Then Text4(i).Text = Data1.Recordset.Fields(3) End If If Len(Data1.Recordset.Fields(4)) > 0 Then Text5(i).Text = Data1.Recordset.Fields(4) End If If Len(Data1.Recordset.Fields(5)) > 0 Then Text6(i).Text = Data1.Recordset.Fields(5) End If Data1.Recordset.MoveNext While Not Data1.Recordset.EOF i = i + 1 Load Text1(i) Load Text2(i) Load Text3(i) Load Text4(i) Load Text5(i) Load Text6(i) Text1(i).Top = Text1(i - 1).Top + 300 Text2(i).Top = Text2(i - 1).Top + 300 Text3(i).Top = Text3(i - 1).Top + 300 Text4(i).Top = Text4(i - 1).Top + 300 Text5(i).Top = Text4(i - 1).Top + 300 Text6(i).Top = Text4(i - 1).Top + 300 Text1(i).Visible = True Text2(i).Visible = True Text3(i).Visible = True Text4(i).Visible = True Text5(i).Visible = True Text6(i).Visible = True If Len(Data1.Recordset.Fields(0)) > 0 Then Text1(i).Text = Data1.Recordset.Fields(0) End If If Len(Data1.Recordset.Fields(1)) > 0 Then Text3(i).Text = Data1.Recordset.Fields(1) End If If Len(Data1.Recordset.Fields(2)) > 0 Then Text2(i).Text = Data1.Recordset.Fields(2) End If If Len(Data1.Recordset.Fields(3)) > 0 Then Text4(i).Text = Data1.Recordset.Fields(3) End If If Len(Data1.Recordset.Fields(4)) > 0 Then Text5(i).Text = Data1.Recordset.Fields(4) End If If Len(Data1.Recordset.Fields(5)) > 0 Then Text6(i).Text = Data1.Recordset.Fields(5) End If Data1.Recordset.MoveNext Wend Else MsgBox "Sorry No record" End If End Sub Private Sub Combo1_Click() sujit Combo1.Enabled = False End Sub Private Sub Combo1_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Combo1_Click End If End Sub Private Sub Command1_Click() Unload Me Form11.Show End Sub Private Sub exit_Click() Unload Me End Sub Private Sub Form_Load() Data1.DatabaseName = App.Path & "\B-tek.mdb" Data1.RecordSource = "select distinct regno from receipt" Data1.Refresh If Not Data1.Recordset.EOF Then Data1.Recordset.MoveFirst While Not Data1.Recordset.EOF Combo1.AddItem Data1.Recordset.Fields(0) Data1.Recordset.MoveNext Wend End If End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Command3_Click() If Len(Combo1.Text) > 0 Then Data1.RecordSource = "Select * from receipt where RegNo='" & Combo1.Text & "'" Data1.Refresh i = 0 If Not Data1.Recordset.EOF Then While Not Data1.Recordset.EOF Data1.Recordset.Edit Data1.Recordset.Fields(0) = Text1(i).Text Data1.Recordset.Fields(4) = Text2(i).Text Data1.Recordset.Fields(3) = Text3(i).Text Data1.Recordset.Fields(5) = Text4(i).Text Data1.Recordset.Fields(6) = Text5(i).Text Data1.Recordset.Fields(7) = Text6(i).Text Data1.Recordset.Update Data1.Recordset.MoveNext i = i + 1 Wend End If MsgBox "Record update" Unload Me Else MsgBox "Please select the RegNo" End If End Sub Dim i As Integer Private Sub sujit() i = 0 Data1.RecordSource = "Select Date, Cheque_no,NextDate,Pay_mode,RS,Signature from receipt where RegNo='" & Combo1.Text & "'" Data1.Refresh If Not Data1.Recordset.EOF Then If Len(Data1.Recordset.Fields(0)) > 0 Then Text1(i).Text = Data1.Recordset.Fields(0) End If If Len(Data1.Recordset.Fields(1)) > 0 Then Text3(i).Text = Data1.Recordset.Fields(1) End If If Len(Data1.Recordset.Fields(2)) > 0 Then Text2(i).Text = Data1.Recordset.Fields(2) End If If Len(Data1.Recordset.Fields(3)) > 0 Then Text4(i).Text = Data1.Recordset.Fields(3) End If If Len(Data1.Recordset.Fields(4)) > 0 Then Text5(i).Text = Data1.Recordset.Fields(4) End If If Len(Data1.Recordset.Fields(5)) > 0 Then Text6(i).Text = Data1.Recordset.Fields(5) End If Data1.Recordset.MoveNext While Not Data1.Recordset.EOF i = i + 1 Load Text1(i) Load Text2(i) Load Text3(i) Load Text4(i) Load Text5(i) Load Text6(i) Text1(i).Top = Text1(i - 1).Top + 300 Text2(i).Top = Text2(i - 1).Top + 300 Text3(i).Top = Text3(i - 1).Top + 300 Text4(i).Top = Text4(i - 1).Top + 300 Text5(i).Top = Text4(i - 1).Top + 300 Text6(i).Top = Text4(i - 1).Top + 300 Text1(i).Visible = True Text2(i).Visible = True Text3(i).Visible = True Text4(i).Visible = True Text5(i).Visible = True Text6(i).Visible = True If Len(Data1.Recordset.Fields(0)) > 0 Then Text1(i).Text = Data1.Recordset.Fields(0) End If If Len(Data1.Recordset.Fields(1)) > 0 Then Text3(i).Text = Data1.Recordset.Fields(1) End If If Len(Data1.Recordset.Fields(2)) > 0 Then Text2(i).Text = Data1.Recordset.Fields(2) End If If Len(Data1.Recordset.Fields(3)) > 0 Then Text4(i).Text = Data1.Recordset.Fields(3) End If If Len(Data1.Recordset.Fields(4)) > 0 Then Text5(i).Text = Data1.Recordset.Fields(4) End If If Len(Data1.Recordset.Fields(5)) > 0 Then Text6(i).Text = Data1.Recordset.Fields(5) End If Data1.Recordset.MoveNext Wend Else MsgBox "Sorry No record" End If End Sub Private Sub Combo1_Click() sujit Combo1.Enabled = False End Sub Private Sub Combo1_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Combo1_Click End If End Sub Private Sub Command1_Click() Unload Me Form15.Show End Sub Private Sub exit_Click() Unload Me End Sub Private Sub Form_Load() Data1.DatabaseName = App.Path & "\B-tek.mdb" Data1.RecordSource = "select distinct regno from receipt" Data1.Refresh If Not Data1.Recordset.EOF Then Data1.Recordset.MoveFirst While Not Data1.Recordset.EOF Combo1.AddItem Data1.Recordset.Fields(0) Data1.Recordset.MoveNext Wend End If End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Command3_Click() If Len(Combo1.Text) > 0 Then Data1.RecordSource = "select * from receipt where regno='" & Combo1.Text & "'" Data1.Refresh If Not Data1.Recordset.EOF Then Data1.Recordset.Delete End If Unload Me MDIForm1.Show Else MsgBox "Please select the RegNo" End If End Sub Private Sub CMDADD_Click() If CMDADD.Caption = "ADD" Then CMDADD.Caption = "Save" txtb.Visible = True txtbookno.Visible = True Txttitle.Visible = True Txtauthor.Visible = True Txtyrofedi.Visible = True Txtnoofcopy.Visible = True Txttitle.SetFocus Else Data1.Recordset.AddNew Data1.Recordset.Fields(0) = txtb.Text + txtbookno.Text Data1.Recordset.Fields(1) = Txttitle.Text Data1.Recordset.Fields(2) = Txtauthor Data1.Recordset.Fields(3) = Txtnoofcopy.Text Data1.Recordset.Fields(4) = Txtyrofedi.Text 'Data1.Recordset.Fields(5) = "" Data1.Recordset.Update MsgBox "Record updated" Unload Me End If End Sub Private Sub CMDEXIT_Click() Unload Me End Sub Private Sub Form_Load() Me.Top = 1000 Me.Left = 2500 Me.Height = 6000 Me.Width = 7500 Data1.DatabaseName = App.Path & "\B-tek.mdb" Data1.RecordSource = "select * from librarybook" Data1.Refresh If Data1.Recordset.EOF = True Then txtbookno = "1" Else Data1.Recordset.MoveLast txtbookno = Right(Data1.Recordset.Fields(0).Value, 2) + 1 End If txtb.Visible = False txtbookno.Visible = False Txttitle.Visible = False Txtauthor.Visible = False Txtyrofedi.Visible = False Txtnoofcopy.Visible = False End Sub Private Sub Txtauthor_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtyrofedi.SetFocus End If End Sub Private Sub Txtnoofcopy_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then CMDADD.SetFocus End If End Sub Private Sub Txttitle_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtauthor.SetFocus End If End Sub Private Sub Txtyrofedi_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtnoofcopy.SetFocus End If End Sub Private Sub Combo1_Click() Data1.RecordSource = "Select * from librarybook where BookNo='" & Combo1.Text & "'" Data1.Refresh If Not Data1.Recordset.EOF Then If Len(Data1.Recordset.Fields(1)) > 0 Then Text2.Text = Data1.Recordset.Fields(1) End If If Len(Data1.Recordset.Fields(2)) > 0 Then Text3.Text = Data1.Recordset.Fields(2) End If If Len(Data1.Recordset.Fields(3)) > 0 Then Text4.Text = Data1.Recordset.Fields(3) End If If Len(Data1.Recordset.Fields(4)) > 0 Then Text5.Text = Data1.Recordset.Fields(4) End If Else MsgBox "Sorry!!!!!.....No Record" End If End Sub Private Sub Combo1_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Combo1_Click End If End Sub Private Sub Command1_Click() If Command1.Caption = "EDIT" And Combo1 = "" Then MsgBox "Select a Book", vbInformation, "Error" Exit Sub End If If Command1.Caption = "EDIT" Then Command1.Caption = "SAVE" Combo1.Enabled = False Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Command2.Visible = False Else Data1.Recordset.Edit Data1.Recordset.Fields(1) = Text2.Text Data1.Recordset.Fields(2) = Text3.Text Data1.Recordset.Fields(3) = Text4.Text Data1.Recordset.Fields(4) = Text5.Text Data1.Recordset.Update MsgBox "Record updated" Unload Me End If End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Command3_Click() Unload Me End Sub Private Sub Form_Load() Me.Top = 5 Me.Left = 5 Me.Height = 6000 Me.Width = 8000 Data1.DatabaseName = App.Path & "\B-tek.mdb" Data1.RecordSource = "select distinct BookNo from librarybook" Data1.Refresh If Not Data1.Recordset.EOF Then Data1.Recordset.MoveFirst While Not Data1.Recordset.EOF Combo1.AddItem Data1.Recordset.Fields(0) Data1.Recordset.MoveNext Wend End If End Sub Private Sub Combo1_Click() Data1.RecordSource = "Select * from librarybook where BookNo='" & Combo1.Text & "'" Data1.Refresh If Not Data1.Recordset.EOF Then If Len(Data1.Recordset.Fields(1)) > 0 Then Text2.Text = Data1.Recordset.Fields(1) End If If Len(Data1.Recordset.Fields(2)) > 0 Then Text3.Text = Data1.Recordset.Fields(2) End If If Len(Data1.Recordset.Fields(3)) > 0 Then Text4.Text = Data1.Recordset.Fields(3) End If If Len(Data1.Recordset.Fields(4)) > 0 Then Text5.Text = Data1.Recordset.Fields(4) End If If Len(Data1.Recordset.Fields(5)) > 0 Then Text1.Text = Data1.Recordset.Fields(5) End If Else MsgBox "Sorry!!!!!.....No Record" End If End Sub Private Sub Combo1_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Combo1_Click End If End Sub Private Sub Command1_Click() Unload Me End Sub Private Sub Command2_Click() If Len(Combo1.Text) > 0 Then Data1.RecordSource = "select * from librarybook where bookno='" & Combo1.Text & "'" Data1.Refresh If Not Data1.Recordset.EOF Then Data1.Recordset.Delete End If Unload Me MDIForm1.Show Else MsgBox "select the BookNo" End If End Sub Private Sub Command3_Click() If Len(Trim(Combo1)) = 0 Then MsgBox "Select a Book", vbInformation, "Error" Exit Sub Else 'MsgBox Command3.Caption If Command3.Caption = "&EDIT" Then Command3.Caption = "&SAVE" Combo1.Enabled = False Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text1.Enabled = True Command2.Visible = False Command1.Visible = False Else Data1.Recordset.Edit Data1.Recordset.Fields(1) = Text2.Text Data1.Recordset.Fields(2) = Text3.Text Data1.Recordset.Fields(3) = Text4.Text Data1.Recordset.Fields(4) = Text5.Text Data1.Recordset.Fields(5) = Text1.Text Data1.Recordset.Update MsgBox "Record updated" Unload Me End If End If End Sub Private Sub Form_Load() Me.Top = 5 Me.Left = 5 Me.Height = 7000 Me.Width = 7000 Data1.DatabaseName = App.Path & "\B-tek.mdb" Data1.RecordSource = "select distinct BookNo from librarybook" Data1.Refresh If Not Data1.Recordset.EOF Then Data1.Recordset.MoveFirst While Not Data1.Recordset.EOF Combo1.AddItem Data1.Recordset.Fields(0) Data1.Recordset.MoveNext Wend End If End Sub Dim db As Database Dim rs As Recordset Public a As Integer Public passw As String Public b As Integer Private Sub cmdcancel_Click() End End Sub Private Sub cmdok_Click() Set rs = db.OpenRecordset("select uid,pass from security where uid='" & txtuid & "'" & " And " & "pass='" _ & txtpass & "'", dbOpenSnapshot) If rs.EOF = False Then frmSplash.Show Unload Me ElseIf rs.EOF And b = 2 Then MsgBox "No Hacking, Exiting Now....", vbCritical, "Fatal Error" End Else MsgBox "Enter a Valid Password", vbQuestion, "Error" b = b + 1 Cancel = True End If End Sub Private Sub Form_Load() Me.Top = 3000 Me.Left = 4000 Dim datam As String datam = App.Path & "\B-Tek.mdb" Set db = DBEngine.Workspaces(0).OpenDatabase(datam) a = 0 End Sub Private Sub txtpass_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then cmdok_Click End If End Sub |
|