在Visual Basic中保存按钮问题 [英] Save button problem in Visual basic
本文介绍了在Visual Basic中保存按钮问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
O
问题是,如果我填充一个文本框并确实填充了另一个文本框,它的确会给我消息"框,但直到保存.为什么?
O
The problem is that, if I fill a textbox and does fill another, it does give me the Message box but it is till saving. Why?
推荐答案
首先,看起来您正在将字符串与单个空格进行比较,而不是空白.
另外,您的组合框比较是将文本与其自身进行比较,而不是检查文本是否为空(应使用[cbo] .text ="或[cbo] .SelectedIndex = -1)
Firstly, it looks like you are comparing string to a single whitespace as opposed to being blank.
Also, your combobox comparisons are comparing text against itself, rather than checking if it''s empty (should use [cbo].text = "" or [cbo].SelectedIndex = -1)
这篇关于在Visual Basic中保存按钮问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文