danblack30
MIS
Help!!! I'm trying to populate a drop down list with the output from recordset2 and dynamically limit the data in recordset 2 with recordset1.
What I'm trying to accomplish is.
recordset1 = pagelinks that also = userid 1
recordset2 does not equal userid 1 and does not equal pagelinks from recordset1
Recordset1
SELECT useraccess.UserID, useraccess.Username, linkdetail.pagelinkIDdetail, pagelinks.pagelinks
FROM useraccess INNER JOIN (pagelinks INNER JOIN linkdetail ON pagelinks.pagelinkID = linkdetail.pagelinkIDdetail) ON useraccess.UserID = linkdetail.userID
WHERE useraccess.UserID=MMColParam
Recordset2
SELECT useraccess.UserID, useraccess.Username, linkdetail.pagelinkIDdetail, pagelinks.pagelinks
FROM useraccess INNER JOIN (pagelinks INNER JOIN linkdetail ON pagelinks.pagelinkID = linkdetail.pagelinkIDdetail) ON useraccess.UserID = linkdetail.userID
WHERE useraccess.UserID<>MMColParam and linkdetail.pagelinkiddetail<>MMColParamm
<%
Dim Recordset2__MMColParam
Recordset2__MMColParam = "1"
If (Request.QueryString("UserID") <> "") Then
Recordset2__MMColParam = Request.QueryString("UserID")
End If
%>
<%
Dim duplicate
duplicate = "(Recordset1.Fields.Item("pagelinks").Value)"
Dim Recordset2__MMColParamm
Recordset2__MMColParamm = "1"
If (Request.QueryString("UserID") <> "") Then
Recordset2__MMColParamm = ("duplicate ")
End If
%>
I thought maybe declare the variable and use that but I can't get the code to work. There is also a problem that the pagelinks field in recordset1 has several lines so does that mean I need to create an array and use that variable for mmcolparamm??
Not sure If I can get this done through the relationship or if I need to rethink the code.
Thanks,
Dan
What I'm trying to accomplish is.
recordset1 = pagelinks that also = userid 1
recordset2 does not equal userid 1 and does not equal pagelinks from recordset1
Recordset1
SELECT useraccess.UserID, useraccess.Username, linkdetail.pagelinkIDdetail, pagelinks.pagelinks
FROM useraccess INNER JOIN (pagelinks INNER JOIN linkdetail ON pagelinks.pagelinkID = linkdetail.pagelinkIDdetail) ON useraccess.UserID = linkdetail.userID
WHERE useraccess.UserID=MMColParam
Recordset2
SELECT useraccess.UserID, useraccess.Username, linkdetail.pagelinkIDdetail, pagelinks.pagelinks
FROM useraccess INNER JOIN (pagelinks INNER JOIN linkdetail ON pagelinks.pagelinkID = linkdetail.pagelinkIDdetail) ON useraccess.UserID = linkdetail.userID
WHERE useraccess.UserID<>MMColParam and linkdetail.pagelinkiddetail<>MMColParamm
<%
Dim Recordset2__MMColParam
Recordset2__MMColParam = "1"
If (Request.QueryString("UserID") <> "") Then
Recordset2__MMColParam = Request.QueryString("UserID")
End If
%>
<%
Dim duplicate
duplicate = "(Recordset1.Fields.Item("pagelinks").Value)"
Dim Recordset2__MMColParamm
Recordset2__MMColParamm = "1"
If (Request.QueryString("UserID") <> "") Then
Recordset2__MMColParamm = ("duplicate ")
End If
%>
I thought maybe declare the variable and use that but I can't get the code to work. There is also a problem that the pagelinks field in recordset1 has several lines so does that mean I need to create an array and use that variable for mmcolparamm??
Not sure If I can get this done through the relationship or if I need to rethink the code.
Thanks,
Dan