Determine the Name of the GroupBy Column

Note

Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.

 

This code segment iterates through all the fields of the objRS_Parent Recordset object and concatenates the names of the columns in the parent recordset, excluding any chaptered columns.

strGroupBy = "";
for (intI=0; intI<objRS_Parent.Fields.Count; intI++) {
    if (objRS_Parent(intI).Name != "Chapter") {
        if (strGroupBy != "")
            strGroupBy = strGroupBy + "    " + objRS_Parent(intI).Name;
        else
            strGroupBy = objRS_Parent(intI).Name;
    );
);

For the properties set in this example, the strGroupBy variable is "DIRECTORY".