Microsoft Access 2007 tutorial:Docmd.OpenForm


VI. Docmd.OpenForm

It is used to open a form from another form. You can use this method to open a form in Design View, Layout View, Form View, DataSheet View, PivotTable, PivotChart or other view types.

Ex: I have a form as the figure below:

Microsoft Access 2007 Docmd.OpenForm

Through the form above expresses that the employee that has ID equal to 004(Emp004) is the one who issued the invoice(Inv002). If you want to know about the information of the employee, you have to click View Employee Info button on the form. After you click this button, it will display a form like the following figure:

Microsoft Access 2007 Docmd.OpenForm

You have to type code on View Employee Info Button. And this button you have to rename its name as CmdView and type the code below:

Microsoft Access 2007 Docmd.OpenForm Code



This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.