To find the scale factor used to create the printed photo, we need to compare the length of the sides of the hexagon in the actual sandbox to the length of the sides of the hexagon in the photo.
The actual length of each side of the hexagon is 40 inches, and in the photo, the length of each side is 4 inches.
The scale factor can be calculated using the formula:
\[ \text{Scale Factor} = \frac{\text{Length in photo}}{\text{Actual length}} \]
Substituting the values we have:
\[ \text{Scale Factor} = \frac{4 \text{ inches}}{40 \text{ inches}} = \frac{4}{40} = \frac{1}{10} = 0.1 \]
Thus, the scale factor that was used to create the printed photo of the sandbox is:
\[ \boxed{0.1} \]