如果留空,如何使表格不保存到表格? [英] How to make a form not save to a table if left blank?

查看:96
本文介绍了如果留空,如何使表格不保存到表格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我一整天都在玩这个,并把它推到墙上。


我有一个包含5个文本框的小表单。现在,如果我在关闭它之前没有输入弹出框,则没有任何内容保存到后端的表中,但是如果我输入内容然后改变我的想法并将其删除然后关闭表单它将保存一个空白记录。


我如何检查表单是否所有方框都是空白然后删除可能输入的信息然后关闭而不保存?


我试图使用OnDirty和AfterUpDate函数但没有得到任何位置。

Well i have been playing with this off and on all day and its driving me up a wall.

I have a small form that has 5 text boxes. Now if I were to type nothing in to the pop up box before closeing it nothing is saved to the table on the backend but if i type something and then change my mind and erase it and then just close the form it will save a blank record.

How can i have the form check to see if all of the boxes are blank then erase the info that could have been typed in and then close with out saving?

I was trying to use the OnDirty and AfterUpDate function but was getting no where.

推荐答案

使用afterUpdate为时已晚(这似乎很明显,没有冒犯:O)


在'beforeUpdate'的形式中,有这样的代码:
Using afterUpdate is too late (which kinda seems obvious, no offense :O)

In the form''s beforeUpdate, have code like this:
展开 | 选择 | Wrap | 行号


您好TSO,


我很感激帮助。好吧,我试过你说的但它还没有用。这是我到目前为止所拥有的。


我把它放在BeforeUpdate函数中
Hi TSO,

I appreciate the help. Well i tried what you said but its still not working. Here is what I have so far.

I have placed this in the form BeforeUpdate function
展开 | 选择 | Wrap | 行号


检查帖子再次#2。那里还有另一个想法在等待。
Check post #2 again. There''s already another idea there waiting.


这篇关于如果留空,如何使表格不保存到表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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