在Access VB表单模块中使用全局变量... [英] Using global variables in Access VB form modules...

查看:291
本文介绍了在Access VB表单模块中使用全局变量...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨:


我有两种形式, frmVerifyUser frmVerifyNewPassword 。在两个表单的VB模块中,在最顶层,我尝试设置一个全局变量,如

展开 | 选择 | 换行 | 行号

解决方案

您需要将公共语句放在标准模块中,以明确地将变量声明为公共变量或全局变量,从而在整个过程中可用数据库。


Linq ; 0)>



嗨:


我有两种形式, frmVerifyUser frmVerifyNewP assword 的。在两个表单的VB模块中,在最顶层,我尝试设置一个全局变量,如

展开 | 选择 | 换行 | 行号


< blockquote>


通过在表单的代码模块中声明变量为公共,您实际上是将变量作为表单的属性。如果strNewPassword在Form1中声明并初始化,则可以在Form2中将其作为Form1的属性引用,即:

展开 | 选择 | Wrap | 行号


Hi:

I have two forms, frmVerifyUser and frmVerifyNewPassword. In the VB module for both forms, at the very top, I try to set a global variable like

Expand|Select|Wrap|Line Numbers

解决方案

You need to place the Public statement in a standard module to explicitly declare a variable as a public or global variable, and thus available throughout your database.

Linq ;0)>


Hi:

I have two forms, frmVerifyUser and frmVerifyNewPassword. In the VB module for both forms, at the very top, I try to set a global variable like

Expand|Select|Wrap|Line Numbers


By Declaring a Variable as Public in a Form''s Code Module, you are essentially making the Variable a Property of the Form. If strNewPassword is Declared and Initialized in Form1, you can reference it in Form2 as a Property of Form1, namely:

Expand|Select|Wrap|Line Numbers


这篇关于在Access VB表单模块中使用全局变量...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆