40V is higher than the everyday range of DC adapters.
If you want to include the power supply in your project enclosure, there's always the idea of making your own.
The easy type is a full-wave bridge supply. It uses a transformer, full-wave bridge rectifier, and smoothing capacitor. A fuse is a good idea. And a switch if you need one.
The transformer can be between 35 and 40 V. Rated to provide 500mA (or up to 1A to provide a cushion). By using a transformer you are isolated from mains AC.
Diodes should be 100V reverse rating. 1 A (or 3A for a cushion).
The smoothing capacitor can be 1000 uF to 2200 uF. It depends on how much ripple you can tolerate.
A switched-coil supply is another option (as Crutschow stated). It will be harder to design and construct one. You won't have isolation from mains AC, unless you use a flyback which contains a transformer.