使用OnClick更改值 [英] Change value using OnClick

查看:119
本文介绍了使用OnClick更改值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Access的初学者。我为非营利组织开发了一个管理联系人的数据库。我想通过使用OnClick更改记录中的值。例如,如果值是会员,则我想将其更改为过去的会员点击标签转换为过去的会员


谢谢

Len

解决方案

您可能会发现此链接很有用(发布指南:请在发布到论坛前仔细阅读) 。

如果我们的专家不理解您的问题,或者找不到足够的信息来提供有意义的答案,他们可能会转移到另一个主题。

我们希望尽可能提供答案 - 问题归你所有。


Len,

你的问题很简短,但不是'提供足够的信息。



我是Access的初学者用户。我为非营利组织开发了一个管理联系人的数据库。我想通过使用OnClick更改记录中的值。例如,如果值是会员,则我想将其更改为过去的会员点击标签转换为过去的会员


谢谢

Len



Ok NeoPa是对的,但我会做出一些假设。


首先,我假设你并没有试图改变整个记录,只记录了记录中一个字段中的一个值。因为我不知道该字段的控件的名称,我现在只是将它称为txtMemberStatus。


虽然你可以为此目的使用标签通常不会这样做,因为用户可能会意外地点击标签而没有意识到他们已经做了什么。通常,您将使用命令按钮进行此操作。只需从工具栏中拖出一个并取消向导即可。对于这个例子,我将它称为cmdChangeStatus。


然后只需添加代码,使其如下所示:

展开 | 选择 | Wrap | 行号



Ok NeoPa是对的,但我要做一些假设。


首先,我假设您不是要尝试更改整个记录,而只是记录中一个字段中的一个值。因为我不知道该字段的控件的名称,我现在只是将它称为txtMemberStatus。


虽然你可以为此目的使用标签通常不会这样做,因为用户可能会意外地点击标签而没有意识到他们已经做了什么。通常,您将使用命令按钮进行此操作。只需从工具栏中拖出一个并取消向导即可。对于这个例子,我将它称为cmdChangeStatus。


然后只需添加代码,使其如下所示:

展开 | 选择 | Wrap | 行号

I am a beginner user of Access. I have developed a database for a non-profit to manage contacts. I would like to change a value in a record by using OnClick. For example, If the value is "Member" I would like to change it to "Past Member" by clicking a label "Convert to Past Member"

Thanks
Len

解决方案

You may find this link helpful (POSTING GUIDELINES: Please read carefully before posting to a forum).
If our experts don''t understand your question, or don''t find enough information to give a meaningful answer to, they may well move along to another thread.
We like to be helpful with answers where possible - the questions are down to you.

Len,
Your question is pleasingly brief, but doesn''t give enough information.


I am a beginner user of Access. I have developed a database for a non-profit to manage contacts. I would like to change a value in a record by using OnClick. For example, If the value is "Member" I would like to change it to "Past Member" by clicking a label "Convert to Past Member"

Thanks
Len

Ok NeoPa is right but I''m going to make some assumptions.

Firstly I assume that you are not trying to change the whole record but just one value in one field on the record. As I don''t know the name of the control for that field I''m just going to call it txtMemberStatus for now.

Although you can use a label for this purpose it''s not normally done as users can click on labels accidently and not realise what they''ve done. Normally you would use a command button for this operation. Just drag one off the toolbar and cancel the wizard. For this example I will call it cmdChangeStatus.

Then just add the code so it looks as follows:

Expand|Select|Wrap|Line Numbers


Ok NeoPa is right but I''m going to make some assumptions.

Firstly I assume that you are not trying to change the whole record but just one value in one field on the record. As I don''t know the name of the control for that field I''m just going to call it txtMemberStatus for now.

Although you can use a label for this purpose it''s not normally done as users can click on labels accidently and not realise what they''ve done. Normally you would use a command button for this operation. Just drag one off the toolbar and cancel the wizard. For this example I will call it cmdChangeStatus.

Then just add the code so it looks as follows:

Expand|Select|Wrap|Line Numbers


这篇关于使用OnClick更改值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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