Chapter 10. Creating Form Functionality in Excel

 < Day Day Up > 

It may come as a surprise, but not everyone gets the full install of Microsoft Office on their desktop at work. Many companies put Microsoft Office for Small Business (or Office Standard) on the PCs of a large group of workers, meaning that these users don't have Microsoft Access on their PC. While these users will still have access to the data stored in Access databases through ADO or DAO, they won't be able to use the database frontend.

The features used in Figure 7-1 that placed a button on an Excel sheet and accepted parameters inside individual cells on a worksheet can be employed here. While they work, there may be times that you want to give a more polished frontend to the users, but a client (or your employer) does not want to purchase Access licenses for all users. You can accomplish some of the same Form functionality through an Excel feature called user forms. To see how this works, go to the Visual Basic Editor through Tools Macro Visual Basic Editor (or press Alt+F11). When you are in the Visual Basic Editor, go to the top menu and select Insert UserForm. This brings up a blank UserForm as shown in Figure 10-1. Notice that to the left side of the blank form there is a toolbox, which shows the built-in controls.

While you don't get as many built-in controls or the same features that you get in Access, you can still build a nice frontend to an Access database with a UserForm, which lets you:

  • Enter new records or edit records in a database

  • Accept parameters to pull data from a database

  • Provide buttons to open other UserForm objects

  • Use the RefEdit control to easily accept the entry of an Excel Range

  • Collect parameters to run an Excel Macro/VBA Code

Figure 10-1. Adding a blank UserForm object to an Excel workbook in the Visual Basic Editor


     < Day Day Up > 


    Integrating Excel and Access
    Integrating Excel and Access
    ISBN: 0596009739
    EAN: 2147483647
    Year: 2005
    Pages: 132

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net