开发者

How do i reference the value of a control in a rowsource query?

Im trying to write a query that will pull the value of the selected item in a combobox to use in a WHERE clause.

For example, the user selects "Jeff" out the combobox that is named cboNames. The bound value is 1 (the primary key). I'm trying to create the query:

select * from tbleE开发者_JAVA技巧mployees where empID = cboNames.Value

obviously this doesn't work. Get what I'm trying to do?

How do i place the control value into the query??


select * from tbleEmployees where empID = [Forms]![YourForm]![cboNames]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜