Hello,
I've got a bit of code which is function, but pretty horrific when it comes to handling errors because I am not very familiar with error handling. So, what I would really like is two things.
1) I'd like help with adding some error checking to my code.
2) I'd like some references for error handling/checking so I can start learning more about it.
Code:
Code:
Private Sub ISBN_Exit(Cancel As Integer)
Set db = CurrentDb()
Dim strISBN, sSQL As String
strISBN = Me.ISBN
sSQL = "SELECT * FROM tbl_Books WHERE [ISBN] = '" & strISBN & "'"
Set rst = db.OpenRecordset(sSQL, dbOpenDynaset)
'all information in here where "Order#" is a column in your table
[Book_Title] = rst("Book_Title")
[Publisher] = rst("Publisher")
[Copyright] = rst("Copyright")
[Edition] = rst("Edition")
[Author] = rst("Author")
[Book_Type] = rst("Book_Type")
[Trial_Software] = rst("Trial_Software")
[Comments] = rst("Comments")
rst.Close
End Sub
Thanks in advance.
Best Regards,
Arholly