KnowledgeCity

Microsoft Access 2021 高级:编写自定义函数

Learn how to write custom functions and debug VBA code
免费观看第一课 — 获取全部 3 节课程的完整访问权限。

To view this video please enable JavaScript.

课程:按需
高级  提供者 John Varan  3 课时 ·  14m  语言:阿拉伯语, 德语, 英语, 西班牙语, 法语, 葡萄牙语, 简体中文 

课程描述

The lessons in this course expand upon and add to your knowledge of using the Visual Basic for Applications editor by explaining debugging, which is a critical skill for anyone writing code, as it is how you troubleshoot, identify, test, and correct errors in your code. There are many common methods for debugging code, such as setting and using breakpoints or stepping through your code line by line, that can help you ensure your code is as error-free as possible. By knowing how to use custom functions and understanding the pros and cons of writing your own functions for use in queries, validation rules, calculated values, and conditional formatting rules, you will be able to create more intuitive database applications. 

In this course, you will learn how to debug VBA code using the Visual Basic for Applications editor. We will also discuss how to write your own custom function which can be used in queries, validation rules, calculated values, and conditional formatting rules. By the end of this course, you will be able to integrate custom functions into a Microsoft Access database application by integrating it with an existing query or report.

您将学到的内容

  • 使用Visual Basic for Applications编辑器调试VBA代码
  • 运用调试最佳实践,包括设置断点和逐行单步执行代码
  • 编写可用于查询、验证规则、计算值和条件格式规则的自定义函数
  • 评估编写自定义函数的利弊
  • 通过现有查询或报表将自定义函数集成到Microsoft Access数据库应用程序中

关键要点

  • 调试是编写代码的关键技能,用于排查、识别、测试和纠正错误。
  • 常见调试方法包括设置和使用断点,或逐行单步执行代码,以尽量减少错误。
  • 自定义函数可用于查询、验证规则、计算值和条件格式规则,从而创建更直观的数据库应用程序。
  • 了解编写自定义函数的利弊有助于您判断何时适合使用自定义代码。
  • 完成本课程后,您可以将自定义函数集成到Microsoft Access数据库应用程序的现有查询或报表中。

常见问题

本课程涵盖哪些内容?

课程涵盖在Visual Basic for Applications编辑器中调试VBA代码、编写可用于查询、验证规则、计算值和条件格式规则的自定义函数,以及将这些自定义函数集成到Microsoft Access数据库应用程序中。

完成本课程后我能做什么?

您将能够调试VBA代码、编写自定义函数,并将自定义函数集成到Microsoft Access数据库应用程序的现有查询或报表中。

课时涵盖哪些主题?

课时涵盖自定义函数的概念、编写自定义函数的用户界面,以及创建自定义函数。

本课程培养哪些技能?

课程培养Microsoft Access、Access查询语言、自定义函数以及Visual Basic / Visual Basic for Applications(VBA)方面的技能。

这是一门高级课程吗?

是的。这是一门Microsoft Access 2021高级课程,在现有Visual Basic for Applications编辑器使用知识的基础上进行扩展和深化。