frmTitles.frm

 VERSION 5.00
Begin VB.Form frmTitles
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   4770
   ClientLeft      =   150
   ClientTop       =   435
   ClientWidth     =   7470
   Icon            =   "frmTitles.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4770
   ScaleWidth      =   7470
   StartUpPosition =   2  'CenterScreen
   Begin VB.Timer tmrTimer
      Interval        =   1000
      Left            =   3600
      Top             =   1800
   End
   Begin VB.CommandButton cmdDelete
      Caption         =   "-"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3840
      TabIndex        =   21
      Top             =   4080
      Width           =   615
   End
   Begin VB.CommandButton cmdAdd
      Caption         =   "+"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3000
      TabIndex        =   20
      Top             =   4080
      Width           =   615
   End
   Begin VB.CommandButton cmdPrevious
      Caption         =   "<"
      Height          =   495
      Left            =   1440
      TabIndex        =   19
      Top             =   4080
      Width           =   1215
   End
   Begin VB.CommandButton cmdNext
      Caption         =   ">"
      Default         =   -1  'True
      Height          =   495
      Left            =   4800
      TabIndex        =   18
      Top             =   4080
      Width           =   1215
   End
   Begin VB.CommandButton cmdLast
      Caption         =   ">>"
      Height          =   495
      Left            =   6120
      TabIndex        =   17
      Top             =   4080
      Width           =   1215
   End
   Begin VB.CommandButton cmdFirst
      Caption         =   "<<"
      Height          =   495
      Left            =   120
      TabIndex        =   16
      Top             =   4080
      Width           =   1215
   End
   Begin VB.TextBox txtComm
      DataField       =   "Comments"
      DataSource      =   "datTit"
      Height          =   975
      Left            =   1440
      TabIndex        =   15
      Top             =   2760
      Width           =   5775
   End
   Begin VB.TextBox txtSub
      DataField       =   "Subject"
      DataSource      =   "datTit"
      Height          =   285
      Left            =   5040
      TabIndex        =   14
      Top             =   2160
      Width           =   2175
   End
   Begin VB.TextBox txtNot
      DataField       =   "Notes"
      DataSource      =   "datTit"
      Height          =   285
      Left            =   1440
      TabIndex        =   13
      Top             =   2160
      Width           =   2175
   End
   Begin VB.TextBox txtDesc
      DataField       =   "Description"
      DataSource      =   "datTit"
      Height          =   285
      Left            =   1440
      TabIndex        =   12
      Top             =   1560
      Width           =   2175
   End
   Begin VB.TextBox txtPubID
      DataField       =   "PubID"
      DataSource      =   "datTit"
      Height          =   285
      Left            =   5040
      TabIndex        =   11
      Top             =   1560
      Width           =   2175
   End
   Begin VB.TextBox txtISBN
      DataField       =   "ISBN"
      DataSource      =   "datTit"
      Height          =   285
      Left            =   5040
      TabIndex        =   10
      Top             =   960
      Width           =   2175
   End
   Begin VB.TextBox txtYear
      DataField       =   "Year Published"
      DataSource      =   "datTit"
      Height          =   285
      Left            =   1440
      TabIndex        =   9
      Top             =   960
      Width           =   2175
   End
   Begin VB.TextBox txtTitle
      DataField       =   "Title"
      DataSource      =   "datTit"
      Height          =   285
      Left            =   1440
      TabIndex        =   8
      Top             =   360
      Width           =   5775
   End
   Begin VB.Data datTit
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  'DefaultCursor
      DefaultType     =   2  'UseODBC
      Exclusive       =   0   'False
      Height          =   375
      Left            =   600
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "Titles"
      Top             =   600
      Visible         =   0   'False
      Width           =   6135
   End
   Begin VB.Frame Frame1
      Height          =   855
      Left            =   0
      TabIndex        =   22
      Top             =   3840
      Width           =   7455
   End
   Begin VB.Label lblTime
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Height          =   255
      Left            =   5400
      TabIndex        =   23
      Top             =   0
      Width           =   1815
   End
   Begin VB.Label Label1
      Caption         =   "Title"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   0
      Top             =   360
      Width           =   855
   End
   Begin VB.Label Label9
      Caption         =   "Year"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   7
      Top             =   960
      Width           =   615
   End
   Begin VB.Label Label8
      Caption         =   "Comments"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   6
      Top             =   2760
      Width           =   975
   End
   Begin VB.Label Label7
      Caption         =   "Subject"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   3960
      TabIndex        =   5
      Top             =   2160
      Width           =   975
   End
   Begin VB.Label Label6
      Caption         =   "Notes"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   4
      Top             =   2160
      Width           =   615
   End
   Begin VB.Label Label5
      Caption         =   "Description"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   3
      Top             =   1560
      Width           =   1095
   End
   Begin VB.Label Label3
      Caption         =   "PubID"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   3960
      TabIndex        =   2
      Top             =   1560
      Width           =   735
   End
   Begin VB.Label Label2
      Caption         =   "ISBN"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3960
      TabIndex        =   1
      Top             =   960
      Width           =   1095
   End
   Begin VB.Menu mnuFile
      Caption         =   "&File"
      Begin VB.Menu mnuMain
         Caption         =   "&Main"
      End
      Begin VB.Menu mnuTime
         Caption         =   "Date/&Time"
         Checked         =   -1  'True
      End
      Begin VB.Menu seperator1
         Caption         =   "-"
      End
      Begin VB.Menu mnuExit
         Caption         =   "E&xit"
      End
   End
   Begin VB.Menu mnuTable
      Caption         =   "&Edit"
      Begin VB.Menu mnuAdd
         Caption         =   "&Add"
         Shortcut        =   ^I
      End
      Begin VB.Menu mnuModify
         Caption         =   "&Modify"
         Shortcut        =   ^M
      End
      Begin VB.Menu mnuDelete
         Caption         =   "&Delete"
         Shortcut        =   ^D
      End
      Begin VB.Menu seperator
         Caption         =   "-"
      End
      Begin VB.Menu mnuLock
         Caption         =   "&Read Only"
      End
      Begin VB.Menu seperator2
         Caption         =   "-"
      End
      Begin VB.Menu mnuSearch
         Caption         =   "&Search"
         Shortcut        =   ^S
      End
   End
   Begin VB.Menu mnuMove
      Caption         =   "M&ove"
      Begin VB.Menu mnuFirst
         Caption         =   "&First"
      End
      Begin VB.Menu mnuLast
         Caption         =   "&Last"
      End
      Begin VB.Menu seperator3
         Caption         =   "-"
      End
      Begin VB.Menu mnuPrevious
         Caption         =   "&Previous"
         Shortcut        =   ^Z
      End
      Begin VB.Menu mnuNext
         Caption         =   "&Next"
         Shortcut        =   ^X
      End
   End
End
Attribute VB_Name = "frmTitles"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdAdd_Click()
Call mnuAdd_Click
End Sub

Private Sub cmdDelete_Click()
Call mnuDelete_Click
End Sub

Private Sub cmdFirst_Click()
Call mnuFirst_Click
End Sub

Private Sub cmdLast_Click()
Call mnuLast_Click
End Sub

Private Sub cmdNext_Click()
Call mnuNext_Click
End Sub

Private Sub cmdPrevious_Click()
Call mnuPrevious_Click
End Sub

Private Sub Form_Load()
datTit.DatabaseName = frmOpen.filFile.Path & "\biblio.mdb"
frmTitles.Caption = "Titles | " & datTit.DatabaseName
lblTime.Caption = Now()
End Sub

Private Sub Form_Unload(Cancel As Integer)
End
End Sub

Private Sub mnuAdd_Click()
datTit.Recordset.AddNew
txtTitle.SetFocus
End Sub

Private Sub mnuDelete_Click()
If MsgBox("Delete Current Record?", vbYesNo, "Confirm Delete Record") = vbYes Then
datTit.Recordset.Delete
End If
If datTit.Recordset.EOF = True Then
datTit.Recordset.MovePrevious
Else
datTit.Recordset.MoveNext
End If
End Sub

Private Sub mnuExit_Click()
If MsgBox("Are you sure you want to exit?", vbYesNo, "Confirm Exit") = vbYes Then
End
End If
End Sub

Private Sub mnuFirst_Click()
datTit.Recordset.MoveFirst
End Sub

Private Sub mnuLast_Click()
datTit.Recordset.MoveLast
End Sub

Private Sub mnuLock_Click()
If mnuLock.Checked = False Then
mnuLock.Checked = True
txtTitle.Locked = True
txtYear.Locked = True
txtISBN.Locked = True
txtDesc.Locked = True
txtPubID.Locked = True
txtNot.Locked = True
txtSub.Locked = True
txtComm.Locked = True
Else
mnuLock.Checked = False
txtTitle.Locked = False
txtYear.Locked = False
txtISBN.Locked = False
txtDesc.Locked = False
txtPubID.Locked = False
txtNot.Locked = False
txtSub.Locked = False
txtComm.Locked = False
End If
End Sub

Private Sub mnuMain_Click()
Me.Hide
frmSelect.Show
End Sub

Private Sub mnuModify_Click()
datTit.Recordset.Update
End Sub

Private Sub mnuNext_Click()
If datTit.Recordset.EOF = True Then
datTit.Recordset.MoveFirst
Else
datTit.Recordset.MoveNext
End If
End Sub

Private Sub mnuPrevious_Click()
If datTit.Recordset.BOF = True Then
datTit.Recordset.MoveLast
Else
datTit.Recordset.MovePrevious
End If
End Sub

Private Sub mnuSearch_Click()
Dim MidStr As Integer, Find As String
MidStr = InputBox("PubID to Search?", "Search Publisher")
Find = "PubID=" & MidStr
datTit.Recordset.FindFirst Find
If datTit.Recordset.NoMatch Then
MsgBox "Publisher Not Found!", vbExclamation
End If
End Sub

Private Sub mnuTime_Click()
If mnuTime.Checked = False Then
mnuTime.Checked = True
lblTime.Visible = True
Else
mnuTime.Checked = False
lblTime.Visible = False
End If
End Sub

Private Sub tmrTimer_Timer()
lblTime.Caption = Now()
End Sub

Project Homepage: