自定义输入掩码消息

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

我想允许用户为字段输入输入掩码,并且如果不满足citeria则显示相应的错误消息。输入掩码= 99AA99A,B 然后消息框将显示formate must be'12AB34AB 或者如果输入掩码是9A990C。该消息将是甲酸必须''1A23C'',或''1A234C'' 注意:inputask''A''是任何字母Ucase,''a''是任何字母lCase,我想在两者之间进行差异化以形成msg 抱歉没有形成标签,但不认为这里需要它们 感谢您的帮助

I would like to allow the user to enter an input mask for a field and have the appropriate error message display if the citeria isn''t met.ie: input mask = 99AA99"A""B" the message box would then display "formate must be '' 12AB34AB" or if the input mask was 9A990"C" the message would be "formate must be ''1A23C'', or '' 1A234C''" Note: inputask ''A'' is any letter Ucase, and ''a'' is any letter lCase, I would like to diferenchiant between the two for msg formating sorry not formated right for tags but don''t think they are needed here thanks for helping

推荐答案

我想允许用户输入字段的输入掩码,如果不符合citeria,则显示相应的错误消息。输入掩码= 99AA99A,B然后消息框将显示格式必须是''12AB34AB 或者输入掩码是否为9A​​990C。该消息将是甲酸必须''1A23C'',或''1A234C'' 注意:inputask''A''是任何字母Ucase,''a''是任何字母lCase,我想在两者之间进行差异化以形成msg 抱歉没有形成标签,但不认为这里需要它们 感谢您帮助 I would like to allow the user to enter an input mask for a field and have the appropriate error message display if the citeria isn''t met.ie: input mask = 99AA99"A""B" the message box would then display "formate must be '' 12AB34AB" or if the input mask was 9A990"C" the message would be "formate must be ''1A23C'', or '' 1A234C''" Note: inputask ''A'' is any letter Ucase, and ''a'' is any letter lCase, I would like to diferenchiant between the two for msg formating sorry not formated right for tags but don''t think they are needed here thanks for helping

以下是要替换的代码使用您自己的输入掩码验证错误的访问标准错误消息。这仅适用于带输入掩码的单个字段!如果涉及多个字段,则代码将不同。

Here is the code to replace the Access Standard Error Message for Input Mask Validation Errors with your own. This only applies for a single Field with an Input Mask! If multiple Fields are involved, the code would be different.

展开 | 选择 | Wrap | 行号

感谢您的回复, 但我已经在使用该代码生成自定义输入掩码消息了,这是我想要做的事情,向用户提供一个表单,允许他们创建/编辑输入掩码和然后错误消息将自动修改自己与输入掩码相关(参见OP示例) 谢谢 Thanks for the repy, but I am already using that code to produce custom input mask messages, here what I am trying to do, present the user with a form that will allow them to create/edit the input mask and then the error message would automticly modifiy itself to corispond wth the input mask (see OP for examples) Thanks

感谢您的回复, 但是我已经在使用该代码生成自定义输入掩码消息, 这里是我想要做的,向用户展示表单将允许他们创建/编辑输入掩码,然后错误消息将自动修改自己与输入掩码相关(参见OP示例) 谢谢 Thanks for the repy, but I am already using that code to produce custom input mask messages, here what I am trying to do, present the user with a form that will allow them to create/edit the input mask and then the error message would automticly modifiy itself to corispond wth the input mask (see OP for examples) Thanks

通过表单接口以编程方式修改字段的输入掩码相当容易,将新掩码存储在表中,并引用相关的字段名称,然后使用DLookup在错误消息中正确引用给定字段的掩码。在我看来,我确信大多数(如果不是全部)其他专家/版主都会同意,将此功能提供给您的数据库用户是非常不明智的。

It''s fairly easy to pro-grammatically modify the Input Mask of a Field via a Form Interface, store the new Mask in a Table with some reference to the associated Field Name, then use a DLookup in an Error Message to properly reference the Mask for a given Field. In my opinion, and I''m sure most, if not all, of the other Experts/Moderators will agree, it would be very unwise to give this capability to a User of your Database.

更多推荐

自定义输入掩码消息

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

发布评论

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

>www.elefans.com

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