|
|
Subject:
Time stamp a field
Category: Computers > Programming Asked by: jstm-ga List Price: $10.00 |
Posted:
04 Mar 2005 23:28 PST
Expires: 04 Apr 2005 00:28 PDT Question ID: 485028 |
When I scan a badge number into txtbox1 I would like txtbox2 to be datestamped. How do I make txtbox2 show the date and time when txtbox1 is changed? | |
|
|
Subject:
Re: Time stamp a field
Answered By: hammer-ga on 05 Mar 2005 07:32 PST Rated: |
Jstm, I see by your other questions that you are using VB6. The Textbox can respond to a Change event. This runs whenever the data in the textbox is changed. Double-click on the textbox on your form design. A code window will appear. If it is not already selected, choose Change from the right-hand dropdown. The code will look like this: Private Sub txtbox1_Change() txtbox2 = Now() End Sub Now is a built in function that returns the current date and time. - Hammer |
jstm-ga
rated this answer:
Thanks. |
|
Subject:
Re: Time stamp a field
From: xarqi-ga on 05 Mar 2005 03:05 PST |
I think you'll need to suppky more information about your software development system before you can get specific help. Generically, it should be simple. Presumably, there is a mechanism for triggering an event of some sort when the value of the first field changes. Trap that event and within the handler, put the current system time into the second field. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |