A controlled access pharmaceutical storage cabinet has at least one pull-out drawer that is divided into a number of locked compartments, arranged in rows. Each row of compartments can be configured as a slide-out tray. A slide bar lock is positioned between rows of the compartments, and has a series of slots along each edge which align with lock pins on hinged lids or covers for the compartments. Only one compartment can be opened at a time. A gear-motor is provided for each slide bar to move the slide bar to a position for access to a given compartment. A locking hinged front door panel can swing down to allow the trays to slide out under the locked lids for refilling or replacement.