Windows Scripting
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationWindows Scripting

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 16th, 2007, 02:09 PM
sbenj69's Avatar
sbenj69 sbenj69 is offline
Dark Sonic Apprentice :D
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2007
Location: Redneck part of Illinois
Posts: 1,635 sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 286093 Folding Title: Super Ultimate Folder - Level 1Folding Points: 286093 Folding Title: Super Ultimate Folder - Level 1Folding Points: 286093 Folding Title: Super Ultimate Folder - Level 1Folding Points: 286093 Folding Title: Super Ultimate Folder - Level 1Folding Points: 286093 Folding Title: Super Ultimate Folder - Level 1Folding Points: 286093 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Weeks 15 h 26 m
Reputation Power: 1352
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.

Reply With Quote
  #2  
Old February 16th, 2007, 02:56 PM
markoc's Avatar
markoc markoc is offline
Contributing User
ASP Free Regular (2000 - 2499 posts)
 
Join Date: Nov 2003
Location: UK
Posts: 2,160 markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level)markoc User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 3 Weeks 20 h 31 m 46 sec
Reputation Power: 220
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

%>

###################
Comments on this post
sbenj69 agrees!
__________________
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).

Reply With Quote
  #3  
Old February 19th, 2007, 08:45 AM
sbenj69's Avatar
sbenj69 sbenj69 is offline
Dark Sonic Apprentice :D
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2007
Location: Redneck part of Illinois
Posts: 1,635 sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)sbenj69 User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 286093 Folding Title: Super Ultimate Folder - Level 1Folding Points: 286093 Folding Title: Super Ultimate Folder - Level 1Folding Points: 286093 Folding Title: Super Ultimate Folder - Level 1Folding Points: 286093 Folding Title: Super Ultimate Folder - Level 1Folding Points: 286093 Folding Title: Super Ultimate Folder - Level 1Folding Points: 286093 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Weeks 15 h 26 m
Reputation Power: 1352
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?

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationWindows Scripting > Data access page auto update time


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT