If it were me, I would check the lease agreement I signed to see what it says. The landlord can enter, but, not just any old time and not without some kind of notice, which topics are usually discussed in the lease agreement.
Yes if you have a written lease because it probably says so, and same is true where there is no written lease. But usually the requirement includes some kind of "reasonable notice" unless there's an emergency. If this recurs and no notice is given, and not even a knock at the door, this is a problem. And then again, why was the landlord there? There usually has to be some kind of reason...... and a responsible reasonable landlord will at least concoct a reason even if there isn't one.......
The response given is not intended to create, nor does it create an ongoing duty to respond to questions. The response does not form an attorney-client relationship, nor is it intended to be anything other than the educated opinion of the author. It should not be relied upon as legal advice. The response given is based upon the limited facts provided by the person asking the question. To the extent additional or different facts exist, the response might possibly change. Attorney is currently licensed to practice law actively only in the State of Illinois, inactively in Florida. Responses are based solely on Illinois law unless stated otherwise.