MakeAccess2007 front and create word in WinForms DocIO
You can make Access 2007 a front end to create Word documents by creating COM Interop assemblies and then binding them to the Access 2007 form using macros.
Steps to generate a report from MS-Access:
- Create a .NET library to generate a report using DocIO.
- On the "Application" tab, click the "Assembly Information" and make the assembly COM-visible as "true."
- On the "Build" tab, check the "Register for COM interop" checkbox (towards the bottom: you may need to scroll down). Also, strong name the assembly by signing it.
- Build the application to generate the signed and interop assemblies.
- Open Access 2007. Now, go to the VBA editor (Tools->Macros).
- Include a reference to our newly created library. Select "References" on the Visual Basic Editor "Tools" menu.
- Add a new code module. You can do this with the Insert/Module command on the menu. Values can be bound dynamically with a Form to generate the report.
- Now, run the macro to generate a report.
- Please download the sample from the link below, which demonstrates the use of the Access 2007 database.Note:
- Place the "Data" folder in [C:]. This part of the code is hard-coded.
- Open the Northwind.accdb from the "FinalResult" folder.
- Enable macros when prompted.
- Go to Forms and select Form12.
- Run it, and then click "Generate report" to generate the Word documents.
- Browse through the data by navigating, and then click "Generate report" for generating reports based on OrderID.
Conclusion
I hope you enjoyed learning about making Access 2007 a front end and creating Word documents in WinForms DocIO.
You can refer to our WinForms DocIO feature tour page to learn about its other groundbreaking features. You can also explore our WinForms DocIO documentation to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums or feedback portal. We are always happy to assist you!