This is not possible within the AC prescription writer window, at least up to version 5.029 (I am not running the 5.1 beta yet, but I haven't seen this in the
list of upgrades & fixes).
Up to version 5.029, it was possible to go onto the NewCrop screens (Right click on the patient name, choose "Medications & Prescribing", click on the "ePrescribing" drop-down menu item at the top left of this window, and click on "Manage via NewCrop Screens"). If you write a prescription within NewCrop, the last routing screen has options to search by pharmacy name, ZIP code, telephone number, or a combination of these. However, it is much more tedious than the AC prescription writer.
I suggest opening your web browser and entering the phone number in the Google or Bing search box. Works about 90% of the time.