adam.greer
Registered User.
- Local time
- Today, 12:32
- Joined
- Apr 27, 2006
- Messages
- 43
Hi
I'm using Access 2003 and I came across the Environ function and it's exactly what I need.
I believe I am running in sandbox mode however I found this bit of code on the MS help
I also found Ghudson's post with the same code.
However when I try and use it I receive an error
Run-time error '424'
Object Required
I assumed this ment I was missing a reference. However after trawling the forums and google all I could find with the 'Visual Basic for Aplications'. Is that the correct Object, because I am alreayd using that in my DB.
I am calling the function like this
Any ideas?
Thanks
I'm using Access 2003 and I came across the Environ function and it's exactly what I need.
I believe I am running in sandbox mode however I found this bit of code on the MS help
Code:
Public Function Environ(Expression)
Environ = VBA.Environ(Expression)
End Function
I also found Ghudson's post with the same code.
However when I try and use it I receive an error
Run-time error '424'
Object Required
I assumed this ment I was missing a reference. However after trawling the forums and google all I could find with the 'Visual Basic for Aplications'. Is that the correct Object, because I am alreayd using that in my DB.
I am calling the function like this
Code:
Private Sub Name_Click()
Forms_Form1.Name = Environ("Username")
End Sub
Any ideas?
Thanks