使用ComboBox选择Case语句 [英] Select Case Statement with ComboBox

查看:96
本文介绍了使用ComboBox选择Case语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很陌生,并且正在努力学习。我已经构建了一个数据库,在我的主窗体上,我有一个名为cbodocumenttype的组合框,一个用户输入的文本框,名为txtuserinput,一个命令按钮授权cmdsearch。我想在cmdsearch按钮上编写一个select case statment事件过程,它将从组合框中获取文档类型(文档类型是一个链接到它自己的表的表单)获取用户键入的值(全部或者从文本框中选择值的一部分(表中的一个字段),打开所选的(表单/表)并按用户键入的值进行过滤。关闭主窗体。如果文本框中有空值,则显示msgbox需要的文档编号。如果组合框中有空值,则显示msgbox文档类型必需。我一直在尝试为此编写代码2周。我现在在我的智慧结束。

请帮助.... NEWBE

I am very new at this and trying to learn. I have built a database and on my main form, I have a combo box titled cbodocumenttype, a text box for user input entitled txtuserinput, and a command button entitle cmdsearch. I want to write a select case statment event procedure on the cmdsearch button that will get the document type from the combo box (the document type is a form that is linked to it''s own table) get the value the user types (all or part of the value) (a field from the table) from the text box, open the selected (form/table) and filter by the user typed value. Close the Main form. If there is a null value in the text box, diplay a msgbox "Document Number Required" and if there is a null value in the combo box, display a msgbox "Document Type Required". I have been trying to write a code for this for 2 weeks now. I am now at my wits end.
PLEASE HELP....NEWBE

推荐答案

您遇到问题的代码部分是什么?
What part of the code are you having trouble with?


我猜它全部。这就是我到目前为止所有:
I Guess all of it. This is all I have so far:
展开 | 选择 | Wrap | 行号


查看此示例代码是否有意义:
See if this example code makes sense:
展开 | 选择 | Wrap | 行号


这篇关于使用ComboBox选择Case语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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