current date & time & current user

G

Guest

Can I start my 'notes' field with current date & time followed by the current
user? Please advise. I am a new beginner and I don't understand much about
the expressions and macro. Thanks.
 
D

Douglas J. Steele

Current Date/Time is the Now function.

Current user, it depends on your definition. If you're using Access
security, and want their Access login name, you use CurrentUser(). If you
want their Windows login ID, check
http://www.mvps.org/access/api/api0008.htm at "The Access Web"

How you put these values into the field depends on how your form works. You
could put logic in the form's Current event to set the notes field. Assuming
the name of the textbox that's mapped to the Notes field is named txtNotes,
you could use something like:

If Len(txtNotes & "") = 0 Then
txtNotes = Now & " " & fOSUserName() & ": "
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top