What would that validation require? What would "attachment of id" mean? Please describe the requirement outcome.
Most experienced Access developers would recommend NOT using an attachment field in a table in Access, so there's some concern about that in the first place. An id is a value, usually created with an AutoNumber in Access, or generated as a string. In neither case, though, would that involve "attaching" the id to anything.
Once we understand the requirement, it will be easier to offer specific suggestions.