harmankardon
Registered User.
- Local time
- Today, 16:24
- Joined
- Aug 8, 2011
- Messages
- 71
Hello all,
I am trying to set the default value of a textbox (for new records of course) to Environ("Username") by placing the following in the default value field in the textbox property sheet:
When I go to a new record, my textbox is Null. I've tried with the equals sign and without the equals sign and both result in a Null value in the textbox.
I can type ?Environ("Username") in the immediate window and I get the expected result (my network username).
I can set the default value for the textbox in the On Current event and it works fine, just wondering why I can't use the default value field in the property sheet to do this. Other functions such as =Date() work fine in the default value field.
Any idea why this might not be working?
Thanks!
I am trying to set the default value of a textbox (for new records of course) to Environ("Username") by placing the following in the default value field in the textbox property sheet:
Code:
=Environ("Username")
When I go to a new record, my textbox is Null. I've tried with the equals sign and without the equals sign and both result in a Null value in the textbox.
I can type ?Environ("Username") in the immediate window and I get the expected result (my network username).
I can set the default value for the textbox in the On Current event and it works fine, just wondering why I can't use the default value field in the property sheet to do this. Other functions such as =Date() work fine in the default value field.
Any idea why this might not be working?
Thanks!