Private Sub cmdAuthor_Click()
Adodc1.RecordSource = "SELECT Author FROM book" Adodc1.Refresh Adodc1.Caption = Adodc1.RecordSource End Sub
Private Sub cmdTitle_Click()
Adodc1.RecordSource = "SELECT Title FROM book"
Adodc1.Refresh
Adodc1.Caption = Adodc1.RecordSource
End Sub
Private Sub cmdAll_Click()
Adodc1.RecordSource = "SELECT * FROM book"
Adodc1.Refresh
Adodc1.Caption = Adodc1.RecordSource
End Sub
Private Sub OK_Click()
Dim username, password As String
username = "Jun"
password = "02014611@#"
If UsrTxt.Text = username And pwTxt.Text = password Then
MsgBox ("Sucessfully Signed")
ElseIf UsrTxt.Text <> username Or pwTxt.Text <> password Then
MsgBox ("Sign in failed")
End If
End Sub
Private Sub cmdCalComm_Click()
Dim salevol, comm As Currency
salevol = Val(TxtSaleVol.Text)
If salevol >= 6000 And salevol < 120000 Then
comm = salevol * 0.06
ElseIf salevol >= 40000 And salevol < 11000 Then
comm = salevol * 0.4
ElseIf salevol >= 20000 And salevol < 25000 Then
comm = salevol * 0.20
ElseIf salevol >= 40000 Then
comm = salevol * 0.4
Else
comm = 0
End If
LblComm.Caption = Format(comm, "$#,##0.00")
End Sub