Hi Calibus,
I think you are confusing yourself as much as you can.
You care requesting for Request("TicketNum") at the top of the page.
Code:
TicketNumUpdate = Request("TicketNum")
...
strSQL = "SELECT * FROM Escalation_Forms WHERE Ticket_Number =" & TicketNumUpdate
But, somewhere down the page, your FORM contains a field called TicketNumUpdate
Code:
<input type="hidden" name="TicketNumUpdate" value="<%=ObjRS("Ticket_Number")%>">
But, at the bottom of the page you are requesting for request.form("TicketNum"), which doesn't exist in your FORM at all.
Code:
strSQLUpdate = "UPDATE Escalation_Forms SET Status='"&
request.form("Status") &"', Wip_Com='"& request.form("Wip_Com") &"'
Where Ticket_Number='"& request.form("TicketNum") &"'"
So what you are trying to do at last is, you are requesting for something that is not in your form, so obviously
TicketNumUpdate
or
Request("TicketNum")
or
request.form ("TicketNum")
will all hold NOTHING, which results in your lucky error Line 1: Incorrect syntax near '='.. It looks like you don't want to get rid of this error after a long time.:) As Jonax suggested in the other post to change the name from
Ticket_Number to
TicketNum on the right-hand-side, now you have mixed up with changing the Name of the Variable on the left-hand-side and using something else down the page.
I would suggest you to go through some books that covers concept of FORM values submission and retrieval.
When a "txtVAR" field exists in a FORM, only that "txtVAR" can be requested on the page where it gets submitted. You cannot request for something else and look for value in that.
I would say, you change the above mentioned line in the following way.
Code:
TicketNumUpdate = Request("TicketNum")
...
strSQL = "SELECT * FROM Escalation_Forms WHERE Ticket_Number =" & TicketNumUpdate
Within the FORM...
Code:
<input type="hidden" name="TicketNum" value="<%=ObjRS("Ticket_Number")%>">
At the bottom...
Code:
strSQLUpdate = "UPDATE Escalation_Forms SET Status='"&
request.form("Status") &"', Wip_Com='"& request.form("Wip_Com") &"'
Where Ticket_Number='"& TicketNumUpdate &"'"
This should help you get rid of Line 1: Incorrect syntax near '='., but not sure what else would surface.
Also I don't understand why you are using other hidden fields in the FORM? But I really don't want to confuse you more now, will discuss about that later.
Hope this helps.
Cheers!
_________________________
- Vijay G
Strive for Perfection