Text box changes

FACTOR 21

Board Regular
Joined
Mar 3, 2014
Messages
110
I have a text box that pulls the Windows User Id into a form, I need this to set once a new record is created and not to change when someone else views the record.

The user id is pulled via a module and this module is referenced in the default value field on the Data tab of the properties sheet.

Code:
Public Function getWinUser() As String
getWinUser = Environ("UserName")
End Function

Thanks in advance
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I need this to set once a new record is created and not to change when someone else views the record.
Then you want to store it in a field in an underlying table, so that the field is "bound".
That is the only way to have it remember the value.
 
Upvote 0

Forum statistics

Threads
1,215,473
Messages
6,125,013
Members
449,204
Latest member
tungnmqn90

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