The effect of an automated drug-dispensing system on medication error rates was studied. Disguised observations were made on nursing units just before (phase 1) and two months after (phase 2) the implementation of Medstation Rx (Pyxis, San Diego, CA) at a 600-bed hospital. Information gathered included the time of drug administration, the time the medication as ordered to be given, a description of what happened during administration of the dose, and the type of medication error, if any. During phase 1 there were 873 observations and 148 medication errors, for an error rate of 16.9%. During phase 2 the error rate was 10.4% (97 errors in 929 observations). In both study phases, most of the errors were wrong-time errors. The mean +/- S.D. difference between actual and scheduled administration times was 34.5 +/- 48.9 minutes in phase 1 and 30.1 +/- 31.6 minutes in phase 2. Both the decrease in the error rate and the decrease in the departure from scheduled administration times were statistically significant. Medstation Rx was associated with a reduction in the rate of medication errors at a large hospital.