Diatomaceous earth can work to kill the adult moths and the larvae, but it won't work once the squash borers are protected inside of the vine.