Auto Date In a text box

  • Thread starter Thread starter Robert Klotz
  • Start date Start date
R

Robert Klotz

Is it possible to automatically put the date in a text box
every time that certain record is accessed? Like when you
want to add something new to this note box it puts the
date in front

Like this

10/01/03 Added new software
10/02/03 Deleted software

If you know please contact me (e-mail address removed)
 
Hi Robert,

My name is Dennis Schmidt. Thank you for using the Microsoft Newsgroups.

I'm presuming that you want to place that date in the same field that the
text has been typed into. Let's call that TextBoxA. You could use the
forms BeforeUpdate event and the following code to have the date included
before the information is added to the record:

Me!TextBoxA = Date() & " " & Me!TextBoxA

The above would place the date and a space before what already had been
typed in the textbox.

I hope this helps! If you have additional questions on this topic, please
reply to this posting.

Need quick answers to questions like these? The Microsoft Knowledge Base
provides a wealth of information that you can use to troubleshoot a problem
or answer a question! It's located at
http://support.microsoft.com/support/c.asp?M=F>.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.

Regards,
Dennis Schmidt
Microsoft Support
 
Is it possible to automatically put the date in a text box
every time that certain record is accessed? Like when you
want to add something new to this note box it puts the
date in front

Like this

10/01/03 Added new software
10/02/03 Deleted software

I'd strongly suggest storing this log in a different table, not in "a
text box". Bear in mind - a Form, and a textbox on a form, are
*windows* through which you can see and work with data; they are not
repositories for the data! That is stored in a table, and ONLY in a
table. If you're going to be maintaining a history of changes like
this, a history table is a better technique.

You can automatically do this from a Form; use the Form's BeforeUpdate
event, and write VBA code to append data to the log table. Or you may
want to simply put a Subform on the form so that the user can enter
specific details; just set the Default property of the datefield to
Date().
If you know please contact me (e-mail address removed)

Done, but be aware that this request is considered impolite. If it's
worth my while as a self-employed consultant volunteering to come to
the newsgroup to answer questions, it should be worth your time to
come back to the newsgroup for answers; and other people may benefit
from the answer as well. Please reply (if at all) to the newsgroup -
private EMail support is reserved for paying customers.
 
Back
Top