在表中查找值的VB代码是什么? [英] What is the VB code for looking up a value in a table?

查看:77
本文介绍了在表中查找值的VB代码是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的情况是,如果textbox的值=表列中的任何值,则会发生某些结果。我只是想知道代码是什么。

My situation is, if the value of textbox = any of the value in a table column then certain results will occur. I just want to know what the code would be for that.

展开 | 选择 | Wrap | 行号

推荐答案

嗨Jonathan


我认为关于你的progrmming环境的更多信息可能会有所帮助,但是如果它的Access然后尝试VLookup()函数(访问帮助将为你提供必要的信息)。


如果没有那么回发'没有帮助,或者你已经提出具体问题


HTH


MTB
Hi Jonathan

I think a little more info on your progrmming environment might help, but if its Access then try the VLookup() function (Access help will give you the necessary info).

Post back if this doesn''t help, or you have move specific questions

HTH


MTB


你可以使用DLookup我希望


一般语法是DLookup(表达式,域名,[Criter] ia])


因此,对于某些vba代码,您可以使用:

You can use DLookup I expect

General syntax is DLookup(expression, domain,[Criteria])

So for some vba code you can use:

展开 | 选择 | 换行 | 行号


@MikeTheBike


该程序是Access 07.基本上这就是我所拥有和需要的。我有一个文本框(TextboxA),如果我输入一个特定的值,它会在某个字段的表中查找,如果匹配则我将setfocus设置为TextboxB,文本框将显示为SIGNED IN @(timestamp)。 。那么你说我应该使用VLookup()还是别的什么?
@MikeTheBike
The program is Access 07. Basically this is what I have and need. I have a textbox (TextboxA), if I enter a certain value, it looks up in the table in the certain field, if it matches then I setfocus to TextboxB and the textbox will read, "SIGNED IN @ (timestamp)". And so what your saying I should use VLookup() or something else?


这篇关于在表中查找值的VB代码是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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