Communicating with frmRoot.asp

Certain parameters must be passed when opening frmRoot.asp, including the objectID that identifies the message or form to open. Part of the objectID is the public folder ID. Critiques.asp passes the url string it has built in the actual URL passed to frmRoot.asp, following the question mark (?). In frmRoot.asp, the QueryString method of the Request ASP object is used to retrieve the parameters passed on the URL:

urlcommand   = Request.QueryString("command")
url          = Request.QueryString()
bstrObj      = Request.QueryString("obj")
strIndex     = Request.QueryString("index")
urlStore     = Request.QueryString("store")
bstrFolderID = Request.QueryString("ID")
iurlRespType = cint(Request.QuerySTring("rt"))

These local variables are used throughout the rest of frmRoot.asp, especially bstrObj, the objectID of the form to be opened. For example, if a new critique is to be written, the form is opened in compose mode, a new message object is created, and because no objectID has been passed, a new one is generated randomly:

If urlcommand = "new" Then
  If  bstrObj="" Then
     Randomize
     bstrObj = cstr(int(100000 * Rnd()))
     If bCanPost <> 0 then
       Set objOneMsg =  objFolder.Messages.Add
       Set Session(bstrObj) = objOneMsg
       Session(bstrObj).Type = "IPM.Post.EnhancedLitCrit"
       AddIDToCache(bstrObj)
       bstrFormMode = "compose"
       bstrTitle = "New " & "EnhancedLitCrit"
       If "<untitled>" <> "" Then
         objOneMsg.Subject = "<untitled>"
       End If
     End If

FrmRoot.asp performs many other tasks. The next one, for example, is to set initial values to be displayed in the combo boxes that take user ratings about aspects of the item being critiqued. This is done for the Overall Rating field in the following command:

SetInitialValue "{2903020000000000C000000000000046}Overall Rating", 8, 0, "<Select Rating>", 0, 1, objOneMsg