Private Sub btnAdd_Click()

'datBiblio.ReadOnly = False

prompt$ = "Enter new record, & click left arrow"

reply = MsgBox(prompt$, vbOKCancel, "ADD RECORD")

If reply = vbOK Then

txtTitle.SetFocus

datBiblio.Recordset.AddNew

'datBiblio.Recordset.PubId = 14 'required

End If

End Sub

 

Private Sub btnBackup_Click()

prompt$ = "Wanna backup the DB? "

reply = MsgBox(prompt$, vbOKCancel, "BACKUP")

If reply = vbOK Then

CommonDialog1.Filter = "Databases(*.mdb) | *.mdb"

CommonDialog1.Action = 2 'ShowSave

If CommonDialog1.filename <> "" Then

FileCopy datBiblio.DatabaseName, CommonDialog1.filename

End If

End If

End Sub

 

Private Sub btnDelete_Click()

prompt$ = "Really Want to Delete this Book? "

reply = MsgBox(prompt$, vbOKCancel, "Delete Record")

If reply = vbOK Then

datBiblio.Recordset.Delete 'delete it

datBiblio.Recordset.MoveFirst 'move to 1st record

End If

End Sub

 

Private Sub btnFind_Click()

prompt$ = "Enter Title to look for: "

searchstr$ = InputBox(prompt$, "S E A R C H")

Rem go thru the Title table for a Title match

datBiblio.Recordset.Index = "Title"

Rem ... on what the user entered

datBiblio.Recordset.Seek "=", searchstr$

If datBiblio.Recordset.NoMatch Then

MsgBox ("Sorry - no match")

datBiblio.Recordset.MoveFirst

End If

End Sub

Private Sub cmdQuit_Click()

End

End Sub

Last Edited by DrB on 02/18/09