|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Data access page auto update time
Is there a way to make a button for a data access page that will insert "now()" into a field value. For example, when a cashier gets done processing a customer, I would like them to click on a button that, saves the record, and updates the field "cashier timestamp" with the current time. I am doing everything through ms access. I know how to do it when you are creating a new record, however, in this case, the cashier is actually just updating an existing record. Thanks in advance.
|
|
#2
|
||||
|
||||
|
Data access page auto update time
try something like:
Code:
#### BUTTON PAGE ####
function cashier_update(orderid) {
var strURL = "update_cashier_timestamp.asp?orderid=" + orderid;
window.location.href = strURL;
}
//-->
</script>
</head>
<body>
<%
DIM strOrderID
strOrderID = 12345
%>
<input type="button" name="complete_order" value="Complete Order" onclick="cashier_update('<%=strOrderID%>');" />
####################
### UPDATE PAGE ####
<%
DIM conn, rs, strSql
' ###DECLARE YOU CONNECTION SETTINGS ###
strSql = "UPDATE tblOrders SET" _
& " fldCashierTimeStamp = #" & now() & "#" _
& " WHERE fldOrderID = " Request("orderid")
conn.Execute strSql
%>
###################
__________________
Hope this advise helps. ![]() If so please show your appreciation by adding reputation points (click gauge image on top right of this post and score).
|
|
#3
|
||||
|
||||
|
Just one question, where would I insert that into my data access page as it doesn't seem to work when I insert it into the html view?
|
![]() |
| Viewing: ASP Free Forums > System Administration > Windows Scripting > Data access page auto update time |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|