目前的事件只在前进 [英] on current event only working going forward

查看:70
本文介绍了目前的事件只在前进的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有基于列表框启用的文本框,因此用户可以输入数据。但是,如果没有输入文字,我希望它们不会启用。我在当前中的代码甚至,makse发生这种情况,但只有当我向前推进记录时。如果我向后移动,则从其他记录启用的文本框将保持启用状态,即使其中没​​有文本也是如此。


Ex。 rec 1有txtbox 1中的数据

rec 2有txtbox 3中的数据

当你从rec 1移动到rec 2时,txtbox 1变为没有启用,因为那里没有数据。一切都很好,但是当我从rec 2转到rec 1时,txtbox 3在没有启用的情况下仍然启用,因为在该框中没有用于rec 1的文本。


参见附件代码:



I have textboxes that become enabled based on a listbox so users can enter data. However, I''d like them to stay not enabled if no text is inputted. The code I have in the "current" even, makse this happen but only when I move forward through the records. If I move back, the textboxes enabled from other records remain enabled, even if there is no text in them.

Ex. rec 1 has data in txtbox 1
rec 2 has data in txtbox 3

When you move from rec 1 to rec 2 txtbox 1 becomes no enabled since there is no data in it. All good, but when I go from rec 2 to rec 1, txtbox 3 remains enabled when it should be not enabled since there is no text in that box for rec 1.

See attached code:

附加文件
visibility code.docx (13.0 KB,178 views)
Attached Files
visibility code.docx (13.0 KB, 178 views)

推荐答案

根据经验,我不会从陌生人那里下载附件。请在线程中发布代码。这样做时会在代码标签中包围代码。


这听起来像是一个Access问题,如果是这样,你就在错误的论坛中。让我知道,我会把它移到Access论坛。
As a rule of thumb, I do not download attachments from strangers. Please post the code in the thread instead. Surround the code in code tags when doing so.

This sounds like an Access question, if so, you are in the wrong forum. Let me know and I''ll move it to the Access forum.


是的,这是一个访问问题。抱歉
yes, it is an access question. sorry


Rabbit:

请在线程中发布代码。在执行此操作时,请在代码标记中包围代码。
Rabbit:
Please post the code in the thread instead. Surround the code in code tags when doing so.



@SeadooRider。

请注意发布的内容 - 特别是在主持人发布时(他们有Mod)在左边的任何头像下方的绿色)。为了帮助您,我们需要查看您的代码。


至于您的问题,您需要确保运行的代码两者

  1. 将可见性设置为 True 应该可见。
  2. 将可见性设置为 False 什么时候不可见。
  1. Sets the visibility to True when it should be visible.
  2. Sets the visibility to False when it should not be visible.

否则你会看到你报告的确切内容。一旦任何记录将可见性设置为 True ,它将永远保持

Otherwise you''ll see exactly what you report. Once any record sets the visibility to True it will stay True for ever.


这篇关于目前的事件只在前进的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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