Answer: I don't want to offend, but are you sure the beetles are black with yellow dots, or are they yellow with black dots? I don't know of the beetle you describe, but the spotted cucumber beetle (yellow w/black spots) is a common and voracious pest of the squash, melon and cuke family of crops. They not only eat plants, they can transmit diseases among them, too! Your first line of defense is to cover the seedlings with floating row cover while they're small and young - when they're most succeptible to damage and disease. When they outgrow the cover, immediately spray with a neem-based repellent ("neem" is an extract of the neem tree seed) according to the label directions. My mom has also had luck using oil of clove as a repellent. She dabs a couple drops on cotton balls and places them throughout the cuke plot, and the beetles stay away.
I can't recommend a spray for "the garden in general". Though many botanical/organic insecticides are broad spectrum (neem, pyrethrin, rotenone), poisons, whatever their source, should be used only when pests are present and likely to reach damaging levels. Spraying broadly kills beneficial as well as harmful insects. If you'd like more information on monitoring and control of insects, you can order a low-cost bulletin, "Growing Vegetables Organically" from the Cornell Cooperative Extension website at
Hope this proves helpful!
Q&A Library Searching Tips