A family of Microsoft relational database management systems designed for ease of use.
The code looks OK, but I would do some things differently
Dim DB As Database
Dim rsBookRef As Recordset
Dim strBookCode As String
Dim lngBookID as Long
Set DB = CurrentDb()
Set rsBookRef = DB.OpenRecordset("conBookRefs", dbOpenDynaset)
rsBookRef.MoveFirst
While (Not rsBookRef.EOF)
With rsBookRef
.Edit
strBookCode = Left(!BookCode,InStr([!BookCode]," ")-1)
lngBookID = Nz(DLookup("[BookID]", "conBookList", "[BookCode]= " & strBookCode,"")
!BookID = lngBookID
.Update
End With
rsBookRef.MoveNext
Wend
MsgBox "Update completed."
Then I would step through the code nd check the value of strBookCode and lngBookID before the Update.