For PG county the law is this:
Landlord's right to access
Tenant may not unreasonably withhold consent for landlord to enter the unit to inspect, make necessary repairs, decorations, alterations, etc., or to show the unit to prospective purchasers, tenants, or mortgagees.
Landlord must not abuse the right to access or use it to harass the tenant. Except in an emergency affecting health, safety, or welfare, tenant must be given at least 24 hours' written or oral notice and landlord's entry must be during normal business hours or at another time mutually agreed to by tenant and landlord.
I'd bet it is the same for the rest of the state. Looks like they have to give notice and not just show up unannounced.