Even though Microsoft Visio 2010 shipped with reverse engineering facility its does not have the capability of forward engineering .But there is a addin in CodePlex which gives the forward engineer capability to the Visio.Somehow Microsoft decided not to include this feature in 2010 version of Visio.
download and install above addin from below link :
After install reopen the Visio.then you will be able to see new tab called Forward Engineer.
Validate Data Model :This will validate your data model and if any error found displays in the output window
Forward Engineer :If there are no errors after the validation you can generate the query for the designed schema.