The three statments below are what happen when I load an asp page. The 1st two statments are response.writes that I used to check what's executing. The 3rd statment is what is executed if none of the 'case' conditions is = to the value of glAction. I have copied the case statements that I'm using below. As you can see, the statement that checks case "FA" is ignored and the action under the very last case statement (case Else) is executed, which is to display "Entry is not permitted from here." Any idea why my the statements under Case "FA" are not executing?
P.S. I left some commented out statements in the code below so that it represents exactly what is on my asp page.
Thanks for any insight. I'm stumped.
--------------------------------------
glAction = FA
write before select case statement
Entry is not permitted from here.
--------------------------------------
Select Case glAction
Case "FA"
response.write("in case FA"
strglAction = "Add"
strTxId = Request.QueryString("Code"
'strCommentType = Request.QueryString("CommentType"
'strCommentSeq = Request.QueryString("CommentSeq"
'strOwnerType = Request.QueryString("OwnerType"
'strOwnerSeq = Request.QueryString("OwnerSeq"
'Call getCommentsRecord
Call subDisplayHeader
Call subDisplayForm
response.write("in case FA and passed call to subDisplayForm" & "<br>"
Case "V"
strglAction = "View"
strTxId = Request.QueryString("Code"
strCommentType = Request.QueryString("CommentType"
strCommentSeq = Request.QueryString("CommentSeq"
strOwnerType = Request.QueryString("OwnerType"
strOwnerSeq = Request.QueryString("OwnerSeq"
Call getCommentsRecord
Call subDisplayHeader
Call subDisplayForm
Case "E"
strglAction = "Edit"
strTxId = Request.QueryString("Code"
strCommentType = Request.QueryString("CommentType"
strCommentSeq = Request.QueryString("CommentSeq"
strOwnerType = Request.QueryString("OwnerType"
strOwnerSeq = Request.QueryString("OwnerSeq"
'strCommentText = Request.QueryString("CommentText"
'strOriginalCommentText = Request.QueryString("CommentText"
Response.Write("case e strOwnerSeq = " & strOwnerSeq & "<br>"
Call getChildrenRecs
Case "ESAVE"
strTxId = Request.QueryString("Code"
strCommentType = Request.QueryString("CommentType"
strCommentSeq = Request.QueryString("CommentSeq"
strOwnerType = Request.QueryString("OwnerType"
strOwnerSeq = Request.QueryString("OwnerSeq"
strCommentText = Request.Form("txtCommentText"
'Response.Write("case esave strorigcomment text = " & strOriginalCommentText & "<br>"
Response.Write("case esave strcomment text = " & strCommentText & "<br>"
Call editCommentRecord
Case "D"
strglAction = "Delete"
strTxId = Request.QueryString("Code"
strCommentType = Request.QueryString("CommentType"
strCommentSeq = Request.QueryString("CommentSeq"
strOwnerType = Request.QueryString("OwnerType"
strOwnerSeq = Request.QueryString("OwnerSeq"
Call getChildrenRecs
Case "DSAVE"
strCreatedBy = glStrLoginId
strTxId = Request.QueryString("Code"
strCommentType = Request.QueryString("CommentType"
strCommentSeq = Request.QueryString("CommentSeq"
strOwnerType = Request.QueryString("OwnerType"
strOwnerSeq = Request.QueryString("OwnerSeq"
Call delCommentRecord
Case Else
Response.Write "<font color=red size=+2>Entry is not permitted from here.</font>"
End Select
P.S. I left some commented out statements in the code below so that it represents exactly what is on my asp page.
Thanks for any insight. I'm stumped.
--------------------------------------
glAction = FA
write before select case statement
Entry is not permitted from here.
--------------------------------------
Select Case glAction
Case "FA"
response.write("in case FA"
strglAction = "Add"
strTxId = Request.QueryString("Code"
'strCommentType = Request.QueryString("CommentType"
'strCommentSeq = Request.QueryString("CommentSeq"
'strOwnerType = Request.QueryString("OwnerType"
'strOwnerSeq = Request.QueryString("OwnerSeq"
'Call getCommentsRecord
Call subDisplayHeader
Call subDisplayForm
response.write("in case FA and passed call to subDisplayForm" & "<br>"
Case "V"
strglAction = "View"
strTxId = Request.QueryString("Code"
strCommentType = Request.QueryString("CommentType"
strCommentSeq = Request.QueryString("CommentSeq"
strOwnerType = Request.QueryString("OwnerType"
strOwnerSeq = Request.QueryString("OwnerSeq"
Call getCommentsRecord
Call subDisplayHeader
Call subDisplayForm
Case "E"
strglAction = "Edit"
strTxId = Request.QueryString("Code"
strCommentType = Request.QueryString("CommentType"
strCommentSeq = Request.QueryString("CommentSeq"
strOwnerType = Request.QueryString("OwnerType"
strOwnerSeq = Request.QueryString("OwnerSeq"
'strCommentText = Request.QueryString("CommentText"
'strOriginalCommentText = Request.QueryString("CommentText"
Response.Write("case e strOwnerSeq = " & strOwnerSeq & "<br>"
Call getChildrenRecs
Case "ESAVE"
strTxId = Request.QueryString("Code"
strCommentType = Request.QueryString("CommentType"
strCommentSeq = Request.QueryString("CommentSeq"
strOwnerType = Request.QueryString("OwnerType"
strOwnerSeq = Request.QueryString("OwnerSeq"
strCommentText = Request.Form("txtCommentText"
'Response.Write("case esave strorigcomment text = " & strOriginalCommentText & "<br>"
Response.Write("case esave strcomment text = " & strCommentText & "<br>"
Call editCommentRecord
Case "D"
strglAction = "Delete"
strTxId = Request.QueryString("Code"
strCommentType = Request.QueryString("CommentType"
strCommentSeq = Request.QueryString("CommentSeq"
strOwnerType = Request.QueryString("OwnerType"
strOwnerSeq = Request.QueryString("OwnerSeq"
Call getChildrenRecs
Case "DSAVE"
strCreatedBy = glStrLoginId
strTxId = Request.QueryString("Code"
strCommentType = Request.QueryString("CommentType"
strCommentSeq = Request.QueryString("CommentSeq"
strOwnerType = Request.QueryString("OwnerType"
strOwnerSeq = Request.QueryString("OwnerSeq"
Call delCommentRecord
Case Else
Response.Write "<font color=red size=+2>Entry is not permitted from here.</font>"
End Select