Identifying a random sample of patients in the community has long proved problematic. In 1989 changes were made in the management of adult asthmatic patients referred to specialist clinics in the Grampian Health Board area. In order to estimate the effect of these changes on the management of patients not referred, it was necessary to identify two random samples of adult asthmatic patients treated solely in general practice. As it was felt that existing methods were open to bias and other errors, a method using National Health Service drug prescription forms was devised. Following the computerization of the Pharmacy Practice Division in Aberdeen, a similar method for the identification of a follow-up sample had to be devised. Nearly 400 general practitioners (86% of those eligible) took part in the first sampling in 1989; 96% of those contacted participated in the second sampling in 1991. Both methods were effective in identifying asthmatic patients in the community. Computerization has made the task simpler, less time consuming and, as a consequence, most cost effective.