P
Pavithra
I have the following code in my module,
Dim DefaultWorkspace As Workspace
Dim MyDb As Database, MySecurity As Recordset
Set MyDb = CurrentDb
Set MySecurity = MyDb.OpenRecordset("Security")
MySecurity.AddNew
MySecurity!UserName = Environ$("LName")
MySecurity!LSrvr = Environ$("LSrvr")
MySecurity!LPNode = Environ$("LPNode")
MySecurity!COMPUTERNAME = Environ$("COMPUTERNAME")
MySecurity!Workgroup = Environ$("Workgroup")
MySecurity!Time = Time()
MySecurity!Date = Date
MySecurity.Update
When the application is run I get the error "Lname not
set"
My doubts are,
What does ENviron$ function do? From where does it lookup
values? from any system file or access file or do i need
to set it somewhere??If Lname is not set then where
should i go and check for its existence?
Thanks,
Pavithra.
Dim DefaultWorkspace As Workspace
Dim MyDb As Database, MySecurity As Recordset
Set MyDb = CurrentDb
Set MySecurity = MyDb.OpenRecordset("Security")
MySecurity.AddNew
MySecurity!UserName = Environ$("LName")
MySecurity!LSrvr = Environ$("LSrvr")
MySecurity!LPNode = Environ$("LPNode")
MySecurity!COMPUTERNAME = Environ$("COMPUTERNAME")
MySecurity!Workgroup = Environ$("Workgroup")
MySecurity!Time = Time()
MySecurity!Date = Date
MySecurity.Update
When the application is run I get the error "Lname not
set"
My doubts are,
What does ENviron$ function do? From where does it lookup
values? from any system file or access file or do i need
to set it somewhere??If Lname is not set then where
should i go and check for its existence?
Thanks,
Pavithra.