Update an Item Link to a new name

Hello! How does one get content record for this script?
When I use

set recs to search "kind:formattednote" in root of database "main"
repeat with rec1 in recs
    open window for rec1

it throws error on open window clause with Some parameter is missing for open window for..

Itβ€˜s open window for record plus the record, e.g.

open window for record theRecord