A question about VB in Access:
Please see the code:
Private Sub collectFromStudent_Click()
On Error GoTo Err_collectFromStudent_Click
Dim accNo As String
Dim queryString As String
accNo = InputBox("Enter accession number of book: ", "Library
Manager")
queryString = "DELETE * FROM studenttransaction WHERE accno= " &
accNo & ";"
DoCmd.RunSQL queryString
Exit_collectFromStudent_Click:
Exit Sub
Err_collectFromStudent_Click:
MsgBox Err.Description
Resume Exit_collectFromStudent_Click
End Sub
This is a event-function which gets activated when a user presses a
button. It accepts a accession number as integer.
Through VB and SQL code how can i determine whether such book with
accession code exists in a table 'studenttransaction' or not?
Whether the DoCmd.RunQSL returns some value?
How to check this?
-Sameer