First, when u click submit button, ur MM_editAction is going back to the same pages and it didnt provide parameter at the end URL.
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
Second, you didnt put any variable to Request.QueryString.
If (Request.QueryString <> "") Then is not produce any value in if statement
please check this few line in ur coding
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If