I have three forms. I hope this will end up being a handy wizard for me.Typically, when I have designed a wizard interfacce, I use a pageframe with tab-less pages. Then, when I hit the next or the back button all I have to do is make the appropriate page the active page. This is also more consistent with typical wizard interfaces.
I then tried your code DO FORM Page2 WITH TableName under the 'Next' button, which calls form2, and I am getting a "variable TABLENAME is not found" error.Try storing the result of the GetFile() function to a form property. Add a property to your form called TableName and populate it like this:
Thisform.TableName = GETFILE()
Then, in your next button you can use this code:
DO FORM Form2 WITH Thisform.TableName
The problem with local variables is that they go out of scope when the method they are in finished. If you have variables that must be seen by the entire form, you need to make them form properties, not public variables.
I suggest that you get a copy of
Fundamentals: Building Visual Studio Applications on a Visual FoxPro 6.0 Foundation Even though it was written for VFP 6.0, most of the principles still apply and it is one of the best books for beginner that I have ever seen.