I think db7uk is correct, the error is in the date field. The SQLQuery string should look like this:
SQLQuery = "UPDATE tblBookBorrowed SET status = '" & shar & "' WHERE #" & String.Format("{0:d}", dd) & "# > datereturn AND penaltyyesno = 'True'"
With using String.Format("{0:d}", dd) you convert the date to a short date based on your local country and language settings. I tested this on my nl-NL computer, it worked but I expected that I had to use en-US (07\24\2012 in stead of the dutch 24-07-2012). When you have other locales I guess it might work. Using paramers would solve this problem.
The issue about formatting parameters in a command might be better solved by using parameters. You code would look something like this:
Dim dd = Date.Today.Date
Dim shar As String = "Overdue"
Connect()
SQLQuery = "UPDATE tblBookBorrowed SET status = ? WHERE ? > datereturn AND penaltyyesno = ?"
cmd = New OleDb.OleDbCommand(SQLQuery, conn)
cmd.Parameters.Add("Status", OleDb.OleDbType.VarChar, 50)
cmd.Parameters.Add("Returndate", OleDb.OleDbType.Date)
cmd.Parameters.Add("Penalty", OleDb.OleDbType.Boolean)
cmd.Parameters("Status").Value = shar
cmd.Parameters("Returndate").Value = dd
cmd.Parameters("Penalty").Value = True
cmd.ExecuteNonQuery()
conn.Dispose()
conn.Close()
cmd = Nothing
I hope this is of use