禁用文本输入上的对象

编程入门 行业动态 更新时间:2024-10-28 20:19:03
本文介绍了禁用文本输入上的对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个包含6个文本框,一个组合框和3个复选框的表单。第一个文本框用于唯一ID;如果用户开始输入此ID,我需要禁用其他5个texbox,组合框和3个复选框,或者如果用户删除输入的数字,则启用它们。我已经尝试在文本框控件下的每个选项下,与keypress,keyup,keydown等有关...我也在表单选项下尝试了这个。它可能非常简单,我根本不在我的聚焦模式。这是我被解雇的函数的代码

I have a form that contains 6 textboxes, a combo box and 3 checkboxes. The first textbox is used for a unique id; if the user starts to enter this ID, I need to disable the other 5 texboxes, combo box and 3 checkboxes or enable them if the user removes entered numerics. I have attempted to this under every option under the textbox control that pertains to keypress, keyup, keydown, etc... I have also attempted this under the form options as well. It is probably something very simple and I am simply not in my focused mode. Here is the code for my fired functions

展开 | 选择 | Wrap | 行号 推荐答案

oohrah, 欢迎来到字节! Semper Fi! 您无法检查当前正在编辑的文本框的值。但是,更新完成后,您可以检查它是否为空。 oohrah, Welcome to Bytes! Semper Fi! You cannot check the value of a text box you are currently editing. However, after the update is complete, you can check to see if it is Null. 展开 | 选择 | Wrap | 行号

谢谢对于回应和OOHRAH回到你身边。这个小程序的目的是让我的志愿者消防部门跟踪付费。我将打印任务设置为字母/信封/返回信封,以具有唯一ID(ParcelID)。我要问的问题是在搜索表单上。我知道我可以解析所有这一切,一旦提交构建我的查询搜索,但我希望超越一个,因为访问此应用程序的人不是最科技温文尔雅的人,如果我可以禁用剩余的输入,也许他们不会浪费时间进一步进入。我在Access 2000和我开发的应用程序中做到了这一点但是在2013年我似乎已经习惯了很多折旧。当然,我不再能够访问这些应用程序的mdb,因为它们是为另一家公司开发的。但我感谢你完善我的代码部分。如果他们在输入ID后尝试访问这些内容,我猜可以禁用所有内容。我唯一的问题是对象被禁用,他们认为ID不正确并将其删除,他们不会尝试点击其他对象重新启用它们。我设置值,因为我想清除之前输入的任何数据。我将组合框值设置为"因为它在我什么都不使用时给了我一个错误 Thanks for the response and OOHRAH back at ya. The purpose of this little program is for my volunteer fire department to keep track of dues paid. I set the print task to for the letters / envelopes / return envelopes to have a unique ID (ParcelID). The issue I am asking about is on the search form. I know I can parse all this out once it is submitted to build my query to search but I was hoping to go one beyond as the people accessing this app are not the most tech suave people around and if I could disable the remaining inputs, maybe they wouldn''t waste their time of entering any further. I did it in Access 2000 and the applications I developed in it but seems like a lot has been depreciated in 2013 as to what i was accustomed to. Of course I no longer have access to the mdb''s of those apps as they were developed for another company. But I appreciate you refining that part of my code. Guess I can live with disabling everything if they try to access those after entering the ID. My only issue would be with the objects being disabled and they decided the ID is incorrect and delete it out, they wouldn''t know to try to click on the other objects to re-enable them. I set values as I wanted to clear any data that may have been entered prior. I set the combo box value to "" as it gave me an error when I use nothing

另外,我确信我没有使用最合理的编程实践,因为我在本周五给出了它并且必须将它安装到位并运行到星期三某个级别 Also, I am sure I am not using the most sound programming practices as I was given this Friday and have to have it in place and functioning to some level by Wednesday

更多推荐

禁用文本输入上的对象

本文发布于:2023-10-12 00:55:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1483316.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文本   对象

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!