Hit the send button a little too soon ...
If you mean when they enter (open) the database, more is required:
1. You will need to create a Public variable that will be available
throughout the current Access session. To do this, open any Module and, at
the very top of the module, insert the following:
Public g_user as String
2. In the Open Event of your main form, you will need the following code:
g_user = InputBox("Enter your initials:")
The value of g_user will be available until the database is closed
3. When a user completes and saves a new record, you would use the
following code in the BeforeInsert event of the data entry form:
AddedBy = g_user
DateAdded = Date()
4. You will need to train your users to close the database when each has
finished a session, so that when a new user wants to enter records, he or
she will be forced to enter a new set of initials.
Of course, both possibilities offered will accept *any* initials. Unless
you also have a table containing acceptable initials and have some code to
compare the entered initials with acceptable initials, it is possible for
"mistakes" to get into the database.
hth,
--
Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX
Dani said:
The system is not networked, there is only one login id (it's a long story
to explain) and I can't change this. Would your method work if I used their
initials entered in an input box when they enter?