How do you select rows based on a multi-value Lookup field in an Access database?
The below ASP code returns no value when using multi-data column:
<%
Dim Contractors
Dim Contractors_cmd
Dim Contractors_numRows
Set Contractors_cmd = Server.CreateObject ("ADODB.Command")
Contractors_cmd.ActiveConnection = MM_Listings_STRING
Contractors_cmd.CommandText = "SELECT * FROM Contractor WHERE UserStatus = 'Active' AND AgentID= "& Session("AgentID")
Contractors_cmd.Prepared = true
Set Contractors = Contractors_cmd.Execute
Contractors_numRows = 0
%>
If
UserStatus
is a multi-value Lookup field then the individual value(s) of that field are accessed viaUserStatus.Value
so you'll need to use