Multiple default values

  • Thread starter Thread starter dsmoot
  • Start date Start date
D

dsmoot

Guest
I thought this would be an easy problem but maybe I'm missing something. I am creating a new database and I have a data entry form. (I am entering check information for daily deposits). I would like to enter my operator ID one time and have it automatically entered on each new record. This would also need to work if multiple persons entering at same time. Is this possible. I'm trying to reduce key strokes.
 
If you are using Workgroup Security you can place =CurrentUser() in the default value field of the OperatorID field and it will automatically populate with the current users ID.

HTH
SteveA
smile.gif
 
You can't use functions (except for Date() and Now())in the table defaults but you can use other functions if you use a form. The field can be hidden so the user doesn't have to see it but if you leave it visible, I would recommend making it non-editable or it defeats the purpose.
 
I was hoping not to use workgroup security. Is there any other way?
 
I have done this (probably the hard way) by creating a table with a single field CurrentUser then using a login screen, setting theat value to the single record using a recordset, or in your case, setting the value to a lookup value using the DLookup function. Then to set the default value for OperatorID in your table/form to this value.

HTH
 
By chance are your users on an NT workgroup. I tried some code from the MS Knowledge base that grabs the NT user log in name and then I used that in my forms for the current user.
 
You can't store the user id in a table unless each user has his own copy of the front end db. You can however just leave it in the login form. Hide the form rather than closing it and you can refer to it when ever you need it.

Forms!YourLoginFormName!YourId
 

Users who are viewing this thread

Back
Top Bottom