Want to return the CurrentUser into a Form Field

Ctrant

New Member
Joined
Jul 30, 2003
Messages
3
I have created a database that is going to be modified by multiple users (approx. 28). I have created workgroups and restricted the users to just be able to enter data into a form so that they cannot mess with the master table. Now I would like to be able determine which data is entered by which user. I saw in Microsoft Access Help that there is a function called CurrentUser, but I cannot figure out how to use this function to create a field in my table that lables each record by the user that imput it. In fact, I cannot figure out how to use this funtion at all. I run windows 95 and Access 97.

This is my first post, so if I have presented this wrong or left out vital information I apologize in advance. I would greatly appreciate any and all help, or even any other suggestions as how to do what I am looking to do.

I considered 28 separate databases, then using the Union All in SQL view, but I have run into server space issues as well as issues with running reports of the SQL queries that limit the data returned. Each of the 28 users enters about 150 records per day.

Thanks again!!!
Cameron
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
What I would do is create a text box on your form and have its control source be the field that you want the current user in. Then, in the Default Value of that text box, put:
  • =CurrentUser()
You can either lock this control (set Locked property to Yes), or you can simply make it invisible (visible=no) so that the user doesn't even know it is there.

HTH,

Russell
 
Upvote 0
Russel, Thanks for the note. But this is what I have been trying to do, and whenever I try and save my table I get a error message that reads, "Unknown function 'CurrentUser' in validation expression or default value on 'My table name'. "

I thought CurrentUser was an already defined function, how can this be unknown?
 
Upvote 0
Nope, not in the table...in the default value property of the text box. You can't use a custom function as the default value of a field in a table. Re-read my previous message for a way around this.
 
Upvote 0
Awesome, Awesome, Awesome!!! Thank you very much for all of your help. I am definitely not an advanced Access user and did not realize that you could set default values for text boxes etc. I had always thought all of that was controlled by the table.

Thanks a million.
 
Upvote 0

Forum statistics

Threads
1,221,545
Messages
6,160,444
Members
451,646
Latest member
mmix803

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top