If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How refer to column of listbox in a query?
How refer to column of listbox in a query?
My SQL: SELECT ID, Category FROM tblCategory WHERE ID IN (SELECT CategoryID FROM tblOrgCatXref WHERE OrgID = [Forms]![frmOrgCat]![lstOrgs].Column(0)); But I get 'invalid function' error. |
#2
|
|||
|
|||
How refer to column of listbox in a query?
If the Bound Column property of lstOrgs is 1, Column(0) is the same value as
lstOrgs so you can remove ".Column(0)" from your expression. PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications "mscertified" wrote in message ... How refer to column of listbox in a query? My SQL: SELECT ID, Category FROM tblCategory WHERE ID IN (SELECT CategoryID FROM tblOrgCatXref WHERE OrgID = [Forms]![frmOrgCat]![lstOrgs].Column(0)); But I get 'invalid function' error. |
#3
|
|||
|
|||
How refer to column of listbox in a query?
"Steve" schreef in bericht news If the Bound Column property of lstOrgs is 1, Column(0) is the same value as lstOrgs so you can remove ".Column(0)" from your expression. PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications Hey Steve, Look at the stats (Statcounter.com) to see the damage you have done to yourself. Every time the link is shown, more and more people are reading about you. http://home.tiscali.nl/arracom/SteveStats.html Since you have been posting 'nice' the last couple of days the 'answering-machine' stops for now. We will be watching you though... ArnoR |
#4
|
|||
|
|||
How refer to column of listbox in a query?
"mscertified" wrote in message
: How refer to column of listbox in a query? My SQL: SELECT ID, Category FROM tblCategory WHERE ID IN (SELECT CategoryID FROM tblOrgCatXref WHERE OrgID = [Forms]![frmOrgCat]![lstOrgs].Column(0)); But I get 'invalid function' error. If the first column is the bound column, refer only to the listbox WHERE OrgID = [Forms]![frmOrgCat]![lstOrgs] If you are trying to refer to a column that isn't the bound column, I think you'd need the Eval function WHERE OrgID = Eval("[Forms]![frmOrgCat]![lstOrgs].Column(0)") -- Roy-Vidar |
Thread Tools | |
Display Modes | |
|
|