PC Review


Reply
Thread Tools Rate Thread

date function, created by and modified by function.

 
 
=?Utf-8?B?RmlsZW1ha2VyUHJvX0RldmVsb3Blcg==?=
Guest
Posts: n/a
 
      22nd Dec 2006
One more for today. What function is for creation date, created by,
modification date, and modified by? I looked in the help and I looked in the
functions. Is creation date date() or dateValue()
I can't guess for modifed by and created by.
thanks,
--
Janis
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      23rd Dec 2006
There are no such functions built into Access.

If you require those values on the records in your tables, you must add code
into the BeforeUpdate event of your form to set the values of the fields
accordingly.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"FilemakerPro_Developer" <(E-Mail Removed)>
wrote in message news:785DA668-48B2-4BA3-9B69-(E-Mail Removed)...
> One more for today. What function is for creation date, created by,
> modification date, and modified by? I looked in the help and I looked in
> the
> functions. Is creation date date() or dateValue()
> I can't guess for modifed by and created by.
> thanks,
> --
> Janis



 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      23rd Dec 2006
On Fri, 22 Dec 2006 15:49:00 -0800, FilemakerPro_Developer
<(E-Mail Removed)> wrote:

>One more for today. What function is for creation date, created by,
>modification date, and modified by?


There are none, unless you put them into a table yourself. Access
doesn't care, and doesn't record, when or by whom a record was created
or modified.

>I looked in the help and I looked in the
>functions. Is creation date date() or dateValue()


Date() is today's date, whenever the function is called. You can put a
DateTime field into a Table and set its DefaultValue property to
Date() to automatically insert the date that the record was created
into the table. Unless you get tricky with database security, though,
you're not protected from someone opening the record and editing that
date to anything they want.

>I can't guess for modifed by and created by.


Because they're not stored. You can get at the Access User if you've
implemented security and require a logon - using the CurrentUser()
function - or, with some VBA code, you can get the WindowsNT Logon ID.

John W. Vinson[MVP]
 
Reply With Quote
 
missinglinq via AccessMonster.com
Guest
Posts: n/a
 
      23rd Dec 2006
Seeing your name, I have to ask if you're actually talking about an Access
app or have you mistakenly posted a question about a FilemakerPro app in the
wroing forum.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200612/1

 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      23rd Dec 2006
On Sat, 23 Dec 2006 14:38:12 GMT, "missinglinq via AccessMonster.com"
<u28780@uwe> wrote:

>Seeing your name, I have to ask if you're actually talking about an Access
>app or have you mistakenly posted a question about a FilemakerPro app in the
>wroing forum.


.... or, like many folks moving from one development to another,
perhaps needing to "unlearn" the "way things are always done" prior to
learning how they're done in the new environment. Been there, done
that, myself - all too many times!

John W. Vinson[MVP]
 
Reply With Quote
 
Smartin
Guest
Posts: n/a
 
      23rd Dec 2006
FilemakerPro_Developer wrote:
> One more for today. What function is for creation date, created by,
> modification date, and modified by? I looked in the help and I looked in the
> functions. Is creation date date() or dateValue()
> I can't guess for modifed by and created by.
> thanks,



I scrounged around in the FileSystemObject properties expecting to find
the answer to this, but failed. But I'm not very familiar with it either.

Maybe someone knows of an API call?

--
Smartin
 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      23rd Dec 2006
"Smartin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> FilemakerPro_Developer wrote:
>> One more for today. What function is for creation date, created by,
>> modification date, and modified by? I looked in the help and I looked in
>> the functions. Is creation date date() or dateValue()
>> I can't guess for modifed by and created by. thanks,

>
>
> I scrounged around in the FileSystemObject properties expecting to find
> the answer to this, but failed. But I'm not very familiar with it either.
>
> Maybe someone knows of an API call?


It depends what you're looking for.

The rest of us have been assuming that he (or she) is asking about creation
date, created by, etc. for rows in tables. If that's the case, then no,
there are no API calls that can help.

Your mention of FileSystemObject sounds as though you're assuming creation
date, created by, etc. for files. There's no way I'm aware of to determine
who created or modified the file using API calls, but you can certainly get
the dates. However, you can get those dates using FSO as well:

Dim objFSO As Object
Dim objFile As Object
Dim strFilePath As String

strFilePath = "C:\Folder\File.txt"

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(strFilePath)

Debug.Print strFilePath & " was created on " & _
objFile.DateCreated
Debug.Print strFilePath & " was last modified on " & _
objFile.DateLastModified
Debug.Print strFilePath & " was last accessed on " & _
objFile.DateLastAccessed


Randy Birch has a good example of how to get the dates using API calls (and
even how to change the dates) at
http://vbnet.mvps.org/code/fileapi/filedatetime.htm

(Obligatory warning: Randy's site is aimed at VB programmers. There are
significant differences between the controls available for forms in VB and
in Access. Because of that, many of Randy's examples won't port directly
into Access. Looking at this particular sample, though, I think it should
work in VB with no changes other than removing the references to .Text when
assigning values to the text boxes)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)



 
Reply With Quote
 
missinglinq via AccessMonster.com
Guest
Posts: n/a
 
      25th Dec 2006
Here's a link to a demo db by Gary Labowitz that does most if not all of
what you want:

http://www.mvps.org/access/modules/mdl0021.htm

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200612/1

 
Reply With Quote
 
=?Utf-8?B?RmlsZW1ha2VyUHJvX0RldmVsb3Blcg==?=
Guest
Posts: n/a
 
      26th Dec 2006
Hi I didn't mistake the Access list for the FM list :-)
--
Janis


"John Vinson" wrote:

> On Sat, 23 Dec 2006 14:38:12 GMT, "missinglinq via AccessMonster.com"
> <u28780@uwe> wrote:
>
> >Seeing your name, I have to ask if you're actually talking about an Access
> >app or have you mistakenly posted a question about a FilemakerPro app in the
> >wroing forum.

>
> .... or, like many folks moving from one development to another,
> perhaps needing to "unlearn" the "way things are always done" prior to
> learning how they're done in the new environment. Been there, done
> that, myself - all too many times!
>
> John W. Vinson[MVP]
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Definitions of created, modified and date created in file properti =?Utf-8?B?Wm9kZHk=?= Windows XP General 0 22nd May 2006 08:31 PM
Date Last Modified Function Leon Microsoft Excel Worksheet Functions 2 26th Nov 2005 10:06 PM
Function to enter users name and date when last modified? Neale Dickson Microsoft Excel Worksheet Functions 1 27th Apr 2004 08:17 AM
Windows Explorer - Date Created and Date Modified Matching iltf124 no spam @hotmail.com Windows XP Help 0 4th Feb 2004 04:20 PM
Date Created, Date Modified Changed to Date CD was burned Mark Windows XP General 0 25th Sep 2003 10:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:19 PM.