Valium is typically a last resort because it has such a potent effect on dogs.
Acepromazine is a sedative that can be used in specific incidences of anxiety, during thunderstorms or when there are fireworks going off, for example.
It's a very strong drug that can easily kill your dog if it's given inappropriately.