How do I use a barcode to identify a device?

I have two tables.

One is Equipment. There are fields: Barcode, Name of Equipment, Where borrowed (Linked).

Other is Lending Equipment. There are fields: Lender, Barcode, Created Date, Where borrowed.

How do I use a barcode to identify a device? How do I use formulas in clever way?