Question: I want to open an Access Form from Excel. I need to filter the records in the form based on a value that I enter in an Excel cell. How can I do this? Answer: This can be done with VBA code. Let's take a look at an example.
|
In our spreadsheet, we've created a button that calls a macro called OpenAccess. This macro will launch Microsoft Access and open an Access database that we specify. In this case, the Access database can be found at "C:\Test\Testing.mdb". Once our Access database has been opened, it will open a Form called Categories to display only those records whose CategoryID matches the value in cell A2 in Excel. In this example, cell A2 contains the value 3, so we'll only display those records in the form whose CategoryID equals 3.
|
Below is the macro code that we used.
|
Macro Code:The macro code looks like this:
|
Visit our busy book shop, were you can find latest books for beginners as well as advanced excel users.
Spreadsheet 123 Spreadsheet Software Development
See Spreadsheets for:
a.Hotel Management b.Personal Budget
c.Corporate Finance d.Rating Calculation e.Real Estate and Mortgage
f.Web Calc