如果另一个不为空,则清除字段 [英] Clear Field if another is not null

查看:101
本文介绍了如果另一个不为空,则清除字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI All 


新手寻求帮助。


我在Access中有一个简单的选择查询,用于收集要导出的数据。  我需要让它删除一个条目,如果在同一行中的另一个条目有一个条目。  


换句话说,如果行中的单元格无效,则清除cellx。


有什么想法吗?

解决方案

您使用的是什么版本的Access?桌面? Web App?


在桌面版中,您必须创建一个绑定到查询的表单,并填写数据。在Forms AfterUpdate事件中,您将得到如下代码:


 Private Sub Form_AfterUpdate()

如果不是IsNull(我!CellY)那么
我!CellX =空
结束如果

结束子

MatthiasKläy,KläyComputingAG



HI All 

Newbie looking for help.

I have a simple select query in Access that collects data for export.  I need to have it l remove an entry if another filed in the same row has an entry.  

In other words if cell in row isnotnull then clear cellx.

Any thoughts?

解决方案

What version of Access do you use? Desktop? Web App?

In the desktop version you would have to create a Form that is bound to your query where you fill in the data. In the Forms AfterUpdate event, you would have code like this:

Private Sub Form_AfterUpdate()

If Not IsNull(Me!CellY) Then
   Me!CellX = Null
End If

End Sub

Matthias Kläy, Kläy Computing AG


这篇关于如果另一个不为空,则清除字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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