Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Determining When Table last had data entered

Discussion in 'Information Technology' started by Gary Townsend \(Spatial Mapping Ltd.\), Jul 28, 2006.

  1. Is there a property of the table or a way to determine when data was last
    entered into a table?

    Thanks
    Gary Townsend
    Spatial Mapping Ltd.
     
  2. Loading...

    Similar Threads Forum Date
    As A Child, Public Marches Of Sikhism Made Me Uncomfortable. They Still Do . Why ? Whats The Logic Hard Talk Oct 16, 2016
    Arts/Society Backyard Vegetable Garden Language, Arts & Culture Dec 27, 2013
    Heritage Now a Vegetable Market, Ranjit Singh's Royal Haveli a Picture of Neglect History of Sikhism Nov 11, 2013
    Sikhism Helium: 1984 and the "Periodic Table of Hate" (Jaspreet Singh) Book Reviews & Editorials Oct 28, 2013
    Heritage How our entire history was dumped in a horse stable History of Sikhism Oct 28, 2013

  3. Well i think i found my answer i just had to change my search parameters. I
    guess teh short answer is not unless i put in a field equivalent to a
    timestamp.

    Gary Townsend
    Spatial Mapping Ltd.
    "Gary Townsend (Spatial Mapping Ltd.)" <garytNADDASPAM@spatialmapping.com>
    wrote in message news:c7t8g.5730$zn1.2829@clgrps13...
    > Is there a property of the table or a way to determine when data was last
    > entered into a table?
    >
    > Thanks
    > Gary Townsend
    > Spatial Mapping Ltd.
    >
    >
     
  4. strive4peace

    strive4peace
    Expand Collapse
    Guest

    Hi Gary,

    Add these 2 fields to all your tables (I make them the last
    2 fields.

    DateCreated, date, DefaultValue = Now()
    DateModified, date -- update on the form BeforeUpdate event

    the best way to use the DateCreated field is to set a
    default value of
    =Now()
    in the table design.

    For Date Modified, make sure it is on your form (I put it in
    the form footer and LOCK it). Then, use the Form
    BeforeUpdate event to set the value

    me.DateModified = now()

    This will record when records were created and modified --
    then you can write a program to search these fields of your
    tables and return the tablename whose record was last changed.

    Warm Regards,
    Crystal
    MVP Microsoft Access

    remote programming and training
    strive4peace2006 at yahoo.com
    *
    Have an awesome day ;)


    Gary Townsend (Spatial Mapping Ltd.) wrote:
    > Is there a property of the table or a way to determine when data was last
    > entered into a table?
    >
    > Thanks
    > Gary Townsend
    > Spatial Mapping Ltd.
    >
    >
     
  5. Thanks never thought of using the default value that way.

    Gary Townsend

    "strive4peace" <strive4peace2006@yahoo.com> wrote in message
    news:uryL2xHdGHA.3352@TK2MSFTNGP03.phx.gbl...
    > Hi Gary,
    >
    > Add these 2 fields to all your tables (I make them the last
    > 2 fields.
    >
    > DateCreated, date, DefaultValue = Now()
    > DateModified, date -- update on the form BeforeUpdate event
    >
    > the best way to use the DateCreated field is to set a
    > default value of
    > =Now()
    > in the table design.
    >
    > For Date Modified, make sure it is on your form (I put it in
    > the form footer and LOCK it). Then, use the Form
    > BeforeUpdate event to set the value
    >
    > me.DateModified = now()
    >
    > This will record when records were created and modified --
    > then you can write a program to search these fields of your
    > tables and return the tablename whose record was last changed.
    >
    > Warm Regards,
    > Crystal
    > MVP Microsoft Access
    >
    > remote programming and training
    > strive4peace2006 at yahoo.com
    > *
    > Have an awesome day ;)
    >
    >
    > Gary Townsend (Spatial Mapping Ltd.) wrote:
    > > Is there a property of the table or a way to determine when data was

    last
    > > entered into a table?
    > >
    > > Thanks
    > > Gary Townsend
    > > Spatial Mapping Ltd.
    > >
    > >
     
  6. (PeteCresswell)

    (PeteCresswell)
    Expand Collapse
    Guest

    Per Gary Townsend (Spatial Mapping Ltd.):
    >Is there a property of the table or a way to determine when data was last
    >entered into a table?


    I think you came up with it already.

    I almost always have four fields at the bottom each tables field list:

    CreatedAt [TimeStamp ]
    CreatedBy [LAN UserID]
    UpdatedAt
    UpdatedBy
    --
    PeteCresswell
     
  7. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Wed, 10 May 2006 21:42:32 GMT, "Gary Townsend \(Spatial Mapping
    Ltd.\)" <garytNADDASPAM@spatialmapping.com> wrote:

    >Is there a property of the table or a way to determine when data was last
    >entered into a table?


    Not unless you put it there. Access does not record that information.

    John W. Vinson[MVP]
     
  8. strive4peace

    strive4peace
    Expand Collapse
    Guest

    you're welcome, Gary ;) happy to help

    Warm Regards,
    Crystal
    MVP Microsoft Access

    remote programming and training
    strive4peace2006 at yahoo.com
    *
    Have an awesome day ;)


    Gary Townsend (Spatial Mapping Ltd.) wrote:
    > Thanks never thought of using the default value that way.
    >
    > Gary Townsend
    >
    > "strive4peace" <strive4peace2006@yahoo.com> wrote in message
    > news:uryL2xHdGHA.3352@TK2MSFTNGP03.phx.gbl...
    >
    >>Hi Gary,
    >>
    >>Add these 2 fields to all your tables (I make them the last
    >>2 fields.
    >>
    >>DateCreated, date, DefaultValue = Now()
    >>DateModified, date -- update on the form BeforeUpdate event
    >>
    >>the best way to use the DateCreated field is to set a
    >>default value of
    >>=Now()
    >>in the table design.
    >>
    >>For Date Modified, make sure it is on your form (I put it in
    >>the form footer and LOCK it). Then, use the Form
    >>BeforeUpdate event to set the value
    >>
    >>me.DateModified = now()
    >>
    >>This will record when records were created and modified --
    >>then you can write a program to search these fields of your
    >>tables and return the tablename whose record was last changed.
    >>
    >>Warm Regards,
    >>Crystal
    >>MVP Microsoft Access
    >>
    >> remote programming and training
    >> strive4peace2006 at yahoo.com
    >> *
    >> Have an awesome day ;)
    >>
    >>
    >>Gary Townsend (Spatial Mapping Ltd.) wrote:
    >>
    >>>Is there a property of the table or a way to determine when data was

    >
    > last
    >
    >>>entered into a table?
    >>>
    >>>Thanks
    >>>Gary Townsend
    >>>Spatial Mapping Ltd.
    >>>
    >>>

    >
    >
    >
     
  9. strive4peace

    strive4peace
    Expand Collapse
    Guest

    Thanks, Pete ;)

    sometimes I add CreatedBy and ModifiedBy ... I like your
    shorter names

    Warm Regards,
    Crystal
    MVP Microsoft Access

    remote programming and training
    strive4peace2006 at yahoo.com
    *
    Have an awesome day ;)


    (PeteCresswell) wrote:
    > Per Gary Townsend (Spatial Mapping Ltd.):
    >
    >>Is there a property of the table or a way to determine when data was last
    >>entered into a table?

    >
    >
    > I think you came up with it already.
    >
    > I almost always have four fields at the bottom each tables field list:
    >
    > CreatedAt [TimeStamp ]
    > CreatedBy [LAN UserID]
    > UpdatedAt
    > UpdatedBy
     
  10. strive4peace

    strive4peace
    Expand Collapse
    Guest

    Hi John,

    nice, concise answer ;)

    Warm Regards,
    Crystal
    MVP Microsoft Access

    remote programming and training
    strive4peace2006 at yahoo.com
    *
    Have an awesome day ;)


    John Vinson wrote:
    > On Wed, 10 May 2006 21:42:32 GMT, "Gary Townsend \(Spatial Mapping
    > Ltd.\)" <garytNADDASPAM@spatialmapping.com> wrote:
    >
    >
    >>Is there a property of the table or a way to determine when data was last
    >>entered into a table?

    >
    >
    > Not unless you put it there. Access does not record that information.
    >
    > John W. Vinson[MVP]
     
  11. Peter Gasparik

    Peter Gasparik
    Expand Collapse
    Guest

    Access 2003 help with Update,Create fields.

    Hi Pete,

    I was looking everywhere go get some information how to create these fields.
    I have a form where I need to have who create, update the form or table and
    when.

    Could you send me an instructions how I can create such a fields I am a
    beginner in Access and I am using Access 2003.

    CreatedAt [TimeStamp ]
    CreatedBy [LAN UserID]
    UpdatedAt
    UpdatedBy

    These are exactly fields I am looking for. Please help. I found your E-mail
    when you were helping a guy on Microsoft web page (Subject: Re: Determining
    When Table last had data entered 5/10/2006 4:24 PM PST)

    Thanks a lot,

    Peter Gasparik.
     
  12. strive4peace

    strive4peace
    Expand Collapse
    Guest

    Re: Access 2003 help with Update,Create fields.

    Hi Peter,

    Make the fields in your table

    for CreatedAt, set DefaultValue --> =Now()

    CreatedBy will be updated in the form BeforeInsert event

    UpdatedAt and UpdatedBy will be updated in the form
    BeforeUpdate event

    Warm Regards,
    Crystal
    Microsoft Access MVP 2006

    *
    Have an awesome day ;)

    remote programming and training
    strive4peace2006 at yahoo.com

    *

    Peter Gasparik wrote:
    > Hi Pete,
    >
    > I was looking everywhere go get some information how to create these fields.
    > I have a form where I need to have who create, update the form or table and
    > when.
    >
    > Could you send me an instructions how I can create such a fields I am a
    > beginner in Access and I am using Access 2003.
    >
    > CreatedAt [TimeStamp ]
    > CreatedBy [LAN UserID]
    > UpdatedAt
    > UpdatedBy
    >
    > These are exactly fields I am looking for. Please help. I found your E-mail
    > when you were helping a guy on Microsoft web page (Subject: Re: Determining
    > When Table last had data entered 5/10/2006 4:24 PM PST)
    >
    > Thanks a lot,
    >
    > Peter Gasparik.
    >
     
  13. Peter Gasparik

    Peter Gasparik
    Expand Collapse
    Guest

    Re: Access 2003 help with Update,Create fields.

    Hi,

    Thank you for your reply, but as I said I am not very good in Access.
    For example how the Access will know who the user is and which name it will
    put in the field CreatedBy [LAN UserID] it is same for UpdatedBy???

    If you have a time and can you take me trough than would be amazing.

    Thank you one more time.

    Peter Gasparik
     
  14. strive4peace

    strive4peace
    Expand Collapse
    Guest

    Re: Access 2003 help with Update,Create fields.

    Hi Peter,

    Where is the LANUserID stored? How do you know who the
    current user is?

    CreatedBy and UpdatedBy will be the same as far as Access
    will use the same value to fill them out in that users
    environment -- but UpdatedBy won't get filled out when a
    record is added, only when it is modified

    Warm Regards,
    Crystal
    Microsoft Access MVP 2006

    *
    Have an awesome day ;)

    remote programming and training
    strive4peace2006 at yahoo.com

    *

    Peter Gasparik wrote:
    > Hi,
    >
    > Thank you for your reply, but as I said I am not very good in Access.
    > For example how the Access will know who the user is and which name it will
    > put in the field CreatedBy [LAN UserID] it is same for UpdatedBy???
    >
    > If you have a time and can you take me trough than would be amazing.
    >
    > Thank you one more time.
    >
    > Peter Gasparik
    >
     
  15. Peter Gasparik

    Peter Gasparik
    Expand Collapse
    Guest

    Re: Access 2003 help with Update,Create fields.

    Hi,

    Well to be honest I do not know where the LANUserID stored, but for example
    when I click on properties on Microsoft Office Access Record-Locking
    Information and then security and then owner it always show who is the
    current owner (or who open the database) for example: Peter Gasparik
    (peter.gasparik@db.com).
    I hard that exist a code which will obtain the user ID of the person who is
    logged on the current PC. Because I have been given unique ID and I need to
    use this ID regarding to log on the PC or Server.

    Secondly maybe I can create s special table when I will store all users with
    their password in order to log in. Then we probably can use this information
    for populating this field, because the user will have to type the user name
    and the password.

    I have only very small number of users around 20.

    Can you advice?

    Regards,

    Peter Gasparik.
     

Share This Page