Click to See Complete Forum and Search --> : What Scripting Language and How?


mitchell8380
05-26-2005, 04:53 PM
We are going to make an already existing ms access database a backend to a html frontend within our intranet enviroment. Currently when the employees open the ms access database, vba code runs to check their username against a table. The VBA code inside the access program used is:

Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Function fOSUserName() As String
' Returns the network login name
Dim lngLen As Long, lngX As Long
Dim strUserName As String
strUserName = String$(254, 0)
lngLen = 255
lngX = apiGetUserName(strUserName, lngLen)
If ( lngX > 0 ) Then
fOSUserName = Left$(strUserName, lngLen - 1)
Else
fOSUserName = vbNullString
End If
End Function

How would I put this into an html page so that I can send it to the database as a hidden field?