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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|