I have a Visual Studio project that I am trying to open a form in the click event of a button. When I try DoCmd.OpenForm "frmName" the compiler says docmd is an error. How do I make DoCmd work?
Thanks
I have a Visual Studio project that I am trying to open a form in the click event of a button. When I try DoCmd.OpenForm "frmName" the compiler says docmd is an error. How do I make DoCmd work?
Thanks

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
You can also use Form.ShowDialog to open the form as a modal form that the user has to close before continuing to use the application.
I use .ShowDialog frequently for database applications that require the user to complete filling out all of the text boxes, etc on a form or click a Close/Cancel button to cancel any adding/editing of data on the form. If your app is "form heavy" using .Show can get you into trouble as well as potentially making the app less maintainable.
My name is Jeff Penchoff and I'm a computer programmer by profession.
My LLC is Web Success Partners where I market various products and work with a large community of website owners. Stop by and check us out!