Hello, lakers8175.
Thanks for the feedback.
As nobody yet volunteers, I would post a solution, not without some hesitation.
My hesitation is mainly twofold.
Firstly, as the entry is stored under the branch of HKCU, I have difficulty in seeing why Last User is allowed to change in time. The _only_ possibility, it seems to me, is that the local m/c is allowed to be logged in by a legitimate user. Then, after logged in, the m/c can be used by some other persons who can work on Access using his/her name proper other than the registered user to the network. If that is the case, I of course have no further comment on it.
Second is that I can only conceive a scheme to implement the registry update soon after the user logged in the m/c. He/she may or may not work at all on the Access thereafter. The scheme is conceived to be kept the user from being disturbed as much as possible. So the following script can either be called soon after the login script is run or within it. I have difficulty in integrating it with Access opening itself. This latter scheme would have avoided the conceptual difficulty mentioned above.
In any case, it is all up to your good judgement.
A short comment on the script. It will check if the registry key exists at all. If the key does not exist, one or some of the key(s) in the chain from HKCU to Settings do not exist. If this is detected, a message box will pop up asking for the user to intervene. Otherwise, it will execute in silence. You can of course comment out the message box and set qry to vbYes or vbNo. Then it would proceed in silence and will or will not create the key itself and set the entry accordingly.
That is all what I have to comment upon.
regards - tsuji
'-------DefaultAccessLastUser.vbs----/tsuji/-----
Option Explicit
Const title = "Registry Update"
Const key = "HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Access\Settings"
Const entry = "Last User"
Dim oNet, value, wsh, qry
Set oNet = CreateObject("WScript.Network"

value = oNet.UserName
Set wsh = CreateObject("WScript.Shell"
On Error Resume Next
wsh.RegRead entry
If Err <>0 Then
qry=MsgBox("Registry key : " & key & " does not exist." & vbCrLf & _
"If you choose to proceed, the key will be built anew." & vbCrLf & _
"Do you choose to proceed ?", vbExclamation+vbYesNo, title)
End If
Err.Clear
On Error GoTo 0
If qry = vbYes Then
wsh.RegWrite key & "\" & entry, value
'---------
'un-Comment this if you prefer intervention from the part of user---which is not preferrable.
'MsgBox "Registry update of entry : " & vbCrLf & _
' key & "\" & entry & " = " & username & vbCrLf & _
' " is successful.", vbInformation, title
'---------
Else
MsgBox "Registry update is aborted", vbInformation, title
End If
Set wsh = Nothing
Set oNet = Nothing
WScript.Quit
'-------DefaultAccessLastUser.vbs----/tsuji/-----