现场依赖 - 访问 [英] Field Dependancy - Access

查看:58
本文介绍了现场依赖 - 访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Access的新手,我需要一些帮助。你如何使1场依赖于另一场?我们使用数据库来处理我们的邮件列表,我希望有一个是/否复选框来接收我们的新闻通讯。但是我想要一个条件,使复选框验证并且电子邮件地址出现在另一个字段中。


任何帮助都会很棒。

I''m new to Access and I need a little help. How do you make 1 field dependant upon another? We use a database to handle our mailing list and I would like to have a check box that says Yes/No to receive our newsletter. However I would like a condition that makes the check box verify that and email address is present in another field.

Any help would be great.

推荐答案

电子邮件字段也在该表单上吗?如果是这样,您可以在复选框的BeforeUpdate事件中输入此代码...

Is the Email field also on that form? If so, you could enter this code in the BeforeUpdate event of your checkbox...

展开 | 选择 | Wrap | 行号


代码第3行应该说......


Me。 YourEmailField .SetFocus


额外的期间!


布拉德
Code line 3 should just say...

Me.YourEmailField .SetFocus

Darn extra periods!

Brad


好主意布拉德。一个小的改进是确认操作员已将其更改为True。这可能是预期的,但防御性编码表明不要过分依赖现有状态。
Nice idea Brad. A small enhancement would be to confirm that the operator had changed it to True. This could be expected, but defensive coding suggests not to rely too heavily on the existing state.
展开 | 选择 | Wrap < span class =codeDivider> | 行号


这篇关于现场依赖 - 访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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