He means this:
TempPass = DLookup("StaffPassword", "Staff_chelsea", "StaffId = " & Me.txtloginid.Value)
Also, it would be best to use a Nz() on that DLookup, to catch any occasion where you might get an Invalid Use of Null error..
TempPass = Nz(DLookup("StaffPassword", "Staff_chelsea"...