A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date and time stamp



 
 
Thread Tools Display Modes
  #1  
Old April 28th, 2004, 08:25 PM
gavin
external usenet poster
 
Posts: n/a
Default Date and time stamp

I would like to be able to have the date and time that each record is
entered recorded automatically in my database. It is only a simple one table
database (basically just names and addresses) and I have a data input form
as a user interface. I don't want the date and time to appear on the form
but merely get entered into the underlying table - is this possible? If it
is I assume it would require some VB. I am a VB newbie so please be gentle
with me!

Can I take this opportunity to ask another question? The database in
question is on a shared network drive and currently 4 users have permission
to write to it (via permissions granted to the folder the database is in).
Is there a way of automatically recording which user has entered which
record?


Thanks for any help you can give me.



Gavin


  #2  
Old April 28th, 2004, 08:36 PM
ELanier
external usenet poster
 
Posts: n/a
Default Date and time stamp

Add A DateTime field to your table. Set the default to Now(). Remove this Date Time field from any forms you don't want it to display on ...
  #3  
Old April 28th, 2004, 09:10 PM
Chris Nebinger
external usenet poster
 
Posts: n/a
Default Date and time stamp

Yes to both.

Saving the time the record is entered is easier than when
it was modified. Create a new field, name it DateUpdated,
and set it's default value to =Now()

For the user, which username do you want? The window's
login? FOr that:

Create a new field, name it User. In it's default
property, set = fOSUserName()

Now, create a new module. paste the code from
http://www.mvps.org/access/api/api0008.htm

Close it, save it, and test it.


Chris Nebinger


-----Original Message-----
I would like to be able to have the date and time that

each record is
entered recorded automatically in my database. It is only

a simple one table
database (basically just names and addresses) and I have

a data input form
as a user interface. I don't want the date and time to

appear on the form
but merely get entered into the underlying table - is

this possible? If it
is I assume it would require some VB. I am a VB newbie so

please be gentle
with me!

Can I take this opportunity to ask another question? The

database in
question is on a shared network drive and currently 4

users have permission
to write to it (via permissions granted to the folder the

database is in).
Is there a way of automatically recording which user has

entered which
record?


Thanks for any help you can give me.



Gavin


.

  #4  
Old April 28th, 2004, 09:13 PM
Chris Nebinger
external usenet poster
 
Posts: n/a
Default Date and time stamp

Upon looking at it, you can't use a user defined function
as the default value. Never knew that.

So, you can only do it on the form that you use to create
the data. On the User control, add the fOSUserName() to
the default value of the control. YOu can set it's
visible property to false then so the user can't change it.


Chris NEbinger



-----Original Message-----
I would like to be able to have the date and time that

each record is
entered recorded automatically in my database. It is only

a simple one table
database (basically just names and addresses) and I have

a data input form
as a user interface. I don't want the date and time to

appear on the form
but merely get entered into the underlying table - is

this possible? If it
is I assume it would require some VB. I am a VB newbie so

please be gentle
with me!

Can I take this opportunity to ask another question? The

database in
question is on a shared network drive and currently 4

users have permission
to write to it (via permissions granted to the folder the

database is in).
Is there a way of automatically recording which user has

entered which
record?


Thanks for any help you can give me.



Gavin


.

  #5  
Old April 28th, 2004, 09:13 PM
Chris Nebinger
external usenet poster
 
Posts: n/a
Default Date and time stamp

Upon looking at it, you can't use a user defined function
as the default value. Never knew that.

So, you can only do it on the form that you use to create
the data. On the User control, add the fOSUserName() to
the default value of the control. YOu can set it's
visible property to false then so the user can't change it.


Chris NEbinger



-----Original Message-----
I would like to be able to have the date and time that

each record is
entered recorded automatically in my database. It is only

a simple one table
database (basically just names and addresses) and I have

a data input form
as a user interface. I don't want the date and time to

appear on the form
but merely get entered into the underlying table - is

this possible? If it
is I assume it would require some VB. I am a VB newbie so

please be gentle
with me!

Can I take this opportunity to ask another question? The

database in
question is on a shared network drive and currently 4

users have permission
to write to it (via permissions granted to the folder the

database is in).
Is there a way of automatically recording which user has

entered which
record?


Thanks for any help you can give me.



Gavin


.

  #6  
Old April 28th, 2004, 10:00 PM
gavin
external usenet poster
 
Posts: n/a
Default Date and time stamp

Many thanks to the respondents - I really appreciate your help!


Best wishes,



Gavin



"Chris Nebinger" wrote in message
...
Upon looking at it, you can't use a user defined function
as the default value. Never knew that.

So, you can only do it on the form that you use to create
the data. On the User control, add the fOSUserName() to
the default value of the control. YOu can set it's
visible property to false then so the user can't change it.


Chris NEbinger



-----Original Message-----
I would like to be able to have the date and time that

each record is
entered recorded automatically in my database. It is only

a simple one table
database (basically just names and addresses) and I have

a data input form
as a user interface. I don't want the date and time to

appear on the form
but merely get entered into the underlying table - is

this possible? If it
is I assume it would require some VB. I am a VB newbie so

please be gentle
with me!

Can I take this opportunity to ask another question? The

database in
question is on a shared network drive and currently 4

users have permission
to write to it (via permissions granted to the folder the

database is in).
Is there a way of automatically recording which user has

entered which
record?


Thanks for any help you can give me.



Gavin


.



  #7  
Old April 29th, 2004, 06:52 PM
gavin
external usenet poster
 
Posts: n/a
Default Date and time stamp

Both solutions work really - thanks so much. Can I just ask if it would be
possible to tweak the date/time solution?

To have =Now() as the default value of the date/time field causes the date
and time to be entered into the new record as soon as the focus moves into
that record (i.e. by hitting the TAB key or ENTER key). However, that new
record could remain "blank" for quite some time before data is entered into
it - therefore the date and time stamp won't be accurate. Is there a way of
having the date and time entered automatically once data has been entered
into the record?


Best wishes,



Gavin







"Chris Nebinger" wrote in message
...
Upon looking at it, you can't use a user defined function
as the default value. Never knew that.

So, you can only do it on the form that you use to create
the data. On the User control, add the fOSUserName() to
the default value of the control. YOu can set it's
visible property to false then so the user can't change it.


Chris NEbinger



-----Original Message-----
I would like to be able to have the date and time that

each record is
entered recorded automatically in my database. It is only

a simple one table
database (basically just names and addresses) and I have

a data input form
as a user interface. I don't want the date and time to

appear on the form
but merely get entered into the underlying table - is

this possible? If it
is I assume it would require some VB. I am a VB newbie so

please be gentle
with me!

Can I take this opportunity to ask another question? The

database in
question is on a shared network drive and currently 4

users have permission
to write to it (via permissions granted to the folder the

database is in).
Is there a way of automatically recording which user has

entered which
record?


Thanks for any help you can give me.



Gavin


.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.