<

Wrapper-1, Query.  Show result of Excel Worksheet Function in Access Query

Posted on
6,013 Points
13 Views
Last Modified:
Experience Level: Beginner
7:06
crystal (strive4peace) - Microsoft MVP, Access
Love empowering people by teaching and helping them develop applications.
Wrapper-1-Query. Use an Excel function to calculate a column for an Access query. Part 1. Shows a query in Access that has a calculated column with the results of an Excel worksheet function.

See how to call a wrapper function from a query, and send the information it needs. "Wrapper Function" is a term to mean a user-defined function (UDF) that calls another program. In this case, Excel is called and one of its worksheet functions is used. This example shows  payment calculations for a number of offers from data that is stored in a table (loan amount, annual interest rate, number of years, and number of payments per year) using Excel's PMT function.

Also see how query columns can display in different colors using the format code, and learn about some of the placeholders.

Part 2 shows how the VBA code works:
Wrapper-2-VBA-Show-result-of-Excel-Worksheet-Function-in-Access-Query.html

Even though topics may be technical, I do my best to consider that a beginner may be watching, so extra detail is added. Hopefully not so much that more advanced users turn away ... maybe you will comment and let me know your thoughts about this? Thanks!

have an awesome day,
crystal

Video Steps

1. Create a query with the fields you want

2. Define calculated fields with intermediate calculations if desired

3. In the calculated column with results from a VBA wrapper function, specify the function name


Send fields, calculated fields, and literal values as parameters inside parentheses

4. To color data in the column, use [ColorName] in the Format property


The color name in square brackets can be Black, Blue, Green, Cyan, Red, Magenta, Yellow, or White

5. Format codes have 4 parts separated with semi-colon (;)


1. Positive, 2. Negative, 3. Zero, 4. Null (vs Text in Excel)
0
Comment
0 Comments

Featured Post

The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Join & Write a Comment

Are you among those users who need to move email from Outlook to Office 365 or Exchange Online? Are you facing an issue in importing Outlook PST files or does not have an idea how to migrate PST file to Office 365? Then you will get an exact solutio…
Know the 5 most critical benefits of Microsoft Office 365 Exchange online for business, enterprise, education, and students. Also, be aware of Office 365 Challenges and how to backup data safely.

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month