If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Default value in table field (username and computername)
This used to work fine in Access 2003 to insert a default value in a field.
=Environ("USERNAME") & " on " & Environ("COMPUTERNAME") Can you please let me know what is the equivalent in Access 2007 |
#2
|
|||
|
|||
Default value in table field (username and computername)
I believe it should work in Access 2007 as well, although I always cringe
when I see people use the Environ function to return the user ID given how easy it is to change. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "mario" wrote in message ... This used to work fine in Access 2003 to insert a default value in a field. =Environ("USERNAME") & " on " & Environ("COMPUTERNAME") Can you please let me know what is the equivalent in Access 2007 |
#3
|
|||
|
|||
Default value in table field (username and computername)
I'm with Douglas on the vulnerability of this approach. Have you looked
into using a call to obtain the NT logon instead? Regards Jeff Boyce Microsoft Office/Access MVP "mario" wrote in message ... This used to work fine in Access 2003 to insert a default value in a field. =Environ("USERNAME") & " on " & Environ("COMPUTERNAME") Can you please let me know what is the equivalent in Access 2007 |
#4
|
|||
|
|||
Default value in table field (username and computername)
http://www.mvps.org/access/api/api0008.htm and
http://www.mvps.org/access/api/api0009.htm at "The Access Web" -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Jeff Boyce" wrote in message ... I'm with Douglas on the vulnerability of this approach. Have you looked into using a call to obtain the NT logon instead? Regards Jeff Boyce Microsoft Office/Access MVP "mario" wrote in message ... This used to work fine in Access 2003 to insert a default value in a field. =Environ("USERNAME") & " on " & Environ("COMPUTERNAME") Can you please let me know what is the equivalent in Access 2007 |
#5
|
|||
|
|||
Default value in table field (username and computername)
These won't work as field defaults in a table design but will work as
defaults for controls in forms. Users should only interact with forms so this should work. -- Duane Hookom Microsoft Access MVP "Douglas J. Steele" wrote: http://www.mvps.org/access/api/api0008.htm and http://www.mvps.org/access/api/api0009.htm at "The Access Web" -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Jeff Boyce" wrote in message ... I'm with Douglas on the vulnerability of this approach. Have you looked into using a call to obtain the NT logon instead? Regards Jeff Boyce Microsoft Office/Access MVP "mario" wrote in message ... This used to work fine in Access 2003 to insert a default value in a field. =Environ("USERNAME") & " on " & Environ("COMPUTERNAME") Can you please let me know what is the equivalent in Access 2007 |
#6
|
|||
|
|||
Default value in table field (username and computername)
"Thanks Duane. I would ideally do something like "=Environ("USERNAME") & "
on " & Environ("COMPUTERNAME")" in the default value of the field in table design, without having to deal with form. I agree, I am not a IT person. Why are people saying that "I always cringe when I see people use the Environ function to return the user ID given how easy it is to change". If it was easy to accomplish in Access 2003 using "=Environ("USERNAME") & " on " & Environ("COMPUTERNAME")", why was it taken off in Access 2007 without an alternate way of doing it. Thanks Mario "Duane Hookom" wrote: These won't work as field defaults in a table design but will work as defaults for controls in forms. Users should only interact with forms so this should work. -- Duane Hookom Microsoft Access MVP "Douglas J. Steele" wrote: http://www.mvps.org/access/api/api0008.htm and http://www.mvps.org/access/api/api0009.htm at "The Access Web" -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Jeff Boyce" wrote in message ... I'm with Douglas on the vulnerability of this approach. Have you looked into using a call to obtain the NT logon instead? Regards Jeff Boyce Microsoft Office/Access MVP "mario" wrote in message ... This used to work fine in Access 2003 to insert a default value in a field. =Environ("USERNAME") & " on " & Environ("COMPUTERNAME") Can you please let me know what is the equivalent in Access 2007 |
#7
|
|||
|
|||
Default value in table field (username and computername)
I'm not sure why the functionality was removed. To be honest I was very
surprised to hear that it worked in earlier versions. Many of us "mature" Access programmers don't believe in offering table datasheet views to users. There is much greater control and functionality with forms. -- Duane Hookom Microsoft Access MVP "mario" wrote: "Thanks Duane. I would ideally do something like "=Environ("USERNAME") & " on " & Environ("COMPUTERNAME")" in the default value of the field in table design, without having to deal with form. I agree, I am not a IT person. Why are people saying that "I always cringe when I see people use the Environ function to return the user ID given how easy it is to change". If it was easy to accomplish in Access 2003 using "=Environ("USERNAME") & " on " & Environ("COMPUTERNAME")", why was it taken off in Access 2007 without an alternate way of doing it. Thanks Mario "Duane Hookom" wrote: These won't work as field defaults in a table design but will work as defaults for controls in forms. Users should only interact with forms so this should work. -- Duane Hookom Microsoft Access MVP "Douglas J. Steele" wrote: http://www.mvps.org/access/api/api0008.htm and http://www.mvps.org/access/api/api0009.htm at "The Access Web" -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Jeff Boyce" wrote in message ... I'm with Douglas on the vulnerability of this approach. Have you looked into using a call to obtain the NT logon instead? Regards Jeff Boyce Microsoft Office/Access MVP "mario" wrote in message ... This used to work fine in Access 2003 to insert a default value in a field. =Environ("USERNAME") & " on " & Environ("COMPUTERNAME") Can you please let me know what is the equivalent in Access 2007 |
#8
|
|||
|
|||
Default value in table field (username and computername)
Hey, Duane!
I heard a new (for me) definition of "expert" ... someone who's made more mistakes than you ... Sorta reminds me of my gramma's definition of "middle-aged" ... halfway between my age and the age of the oldest person I know (she was 85 at the time...) Jeff B. "Duane Hookom" wrote in message ... I'm not sure why the functionality was removed. To be honest I was very surprised to hear that it worked in earlier versions. Many of us "mature" Access programmers don't believe in offering table datasheet views to users. There is much greater control and functionality with forms. -- Duane Hookom Microsoft Access MVP "mario" wrote: "Thanks Duane. I would ideally do something like "=Environ("USERNAME") & " on " & Environ("COMPUTERNAME")" in the default value of the field in table design, without having to deal with form. I agree, I am not a IT person. Why are people saying that "I always cringe when I see people use the Environ function to return the user ID given how easy it is to change". If it was easy to accomplish in Access 2003 using "=Environ("USERNAME") & " on " & Environ("COMPUTERNAME")", why was it taken off in Access 2007 without an alternate way of doing it. Thanks Mario "Duane Hookom" wrote: These won't work as field defaults in a table design but will work as defaults for controls in forms. Users should only interact with forms so this should work. -- Duane Hookom Microsoft Access MVP "Douglas J. Steele" wrote: http://www.mvps.org/access/api/api0008.htm and http://www.mvps.org/access/api/api0009.htm at "The Access Web" -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Jeff Boyce" wrote in message ... I'm with Douglas on the vulnerability of this approach. Have you looked into using a call to obtain the NT logon instead? Regards Jeff Boyce Microsoft Office/Access MVP "mario" wrote in message ... This used to work fine in Access 2003 to insert a default value in a field. =Environ("USERNAME") & " on " & Environ("COMPUTERNAME") Can you please let me know what is the equivalent in Access 2007 |
#9
|
|||
|
|||
Default value in table field (username and computername)
In most circles, that would make me an "expert among experts" ;-)
-- Duane Hookom Microsoft Access MVP "Jeff Boyce" wrote: Hey, Duane! I heard a new (for me) definition of "expert" ... someone who's made more mistakes than you ... Sorta reminds me of my gramma's definition of "middle-aged" ... halfway between my age and the age of the oldest person I know (she was 85 at the time...) Jeff B. "Duane Hookom" wrote in message ... I'm not sure why the functionality was removed. To be honest I was very surprised to hear that it worked in earlier versions. Many of us "mature" Access programmers don't believe in offering table datasheet views to users. There is much greater control and functionality with forms. -- Duane Hookom Microsoft Access MVP "mario" wrote: "Thanks Duane. I would ideally do something like "=Environ("USERNAME") & " on " & Environ("COMPUTERNAME")" in the default value of the field in table design, without having to deal with form. I agree, I am not a IT person. Why are people saying that "I always cringe when I see people use the Environ function to return the user ID given how easy it is to change". If it was easy to accomplish in Access 2003 using "=Environ("USERNAME") & " on " & Environ("COMPUTERNAME")", why was it taken off in Access 2007 without an alternate way of doing it. Thanks Mario "Duane Hookom" wrote: These won't work as field defaults in a table design but will work as defaults for controls in forms. Users should only interact with forms so this should work. -- Duane Hookom Microsoft Access MVP "Douglas J. Steele" wrote: http://www.mvps.org/access/api/api0008.htm and http://www.mvps.org/access/api/api0009.htm at "The Access Web" -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Jeff Boyce" wrote in message ... I'm with Douglas on the vulnerability of this approach. Have you looked into using a call to obtain the NT logon instead? Regards Jeff Boyce Microsoft Office/Access MVP "mario" wrote in message ... This used to work fine in Access 2003 to insert a default value in a field. =Environ("USERNAME") & " on " & Environ("COMPUTERNAME") Can you please let me know what is the equivalent in Access 2007 |
#10
|
|||
|
|||
Default value in table field (username and computername)
Huh?! ?Not "middle-aged"?
Jeff "Duane Hookom" wrote in message ... In most circles, that would make me an "expert among experts" ;-) -- Duane Hookom Microsoft Access MVP "Jeff Boyce" wrote: Hey, Duane! I heard a new (for me) definition of "expert" ... someone who's made more mistakes than you ... Sorta reminds me of my gramma's definition of "middle-aged" ... halfway between my age and the age of the oldest person I know (she was 85 at the time...) Jeff B. "Duane Hookom" wrote in message ... I'm not sure why the functionality was removed. To be honest I was very surprised to hear that it worked in earlier versions. Many of us "mature" Access programmers don't believe in offering table datasheet views to users. There is much greater control and functionality with forms. -- Duane Hookom Microsoft Access MVP "mario" wrote: "Thanks Duane. I would ideally do something like "=Environ("USERNAME") & " on " & Environ("COMPUTERNAME")" in the default value of the field in table design, without having to deal with form. I agree, I am not a IT person. Why are people saying that "I always cringe when I see people use the Environ function to return the user ID given how easy it is to change". If it was easy to accomplish in Access 2003 using "=Environ("USERNAME") & " on " & Environ("COMPUTERNAME")", why was it taken off in Access 2007 without an alternate way of doing it. Thanks Mario "Duane Hookom" wrote: These won't work as field defaults in a table design but will work as defaults for controls in forms. Users should only interact with forms so this should work. -- Duane Hookom Microsoft Access MVP "Douglas J. Steele" wrote: http://www.mvps.org/access/api/api0008.htm and http://www.mvps.org/access/api/api0009.htm at "The Access Web" -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Jeff Boyce" wrote in message ... I'm with Douglas on the vulnerability of this approach. Have you looked into using a call to obtain the NT logon instead? Regards Jeff Boyce Microsoft Office/Access MVP "mario" wrote in message ... This used to work fine in Access 2003 to insert a default value in a field. =Environ("USERNAME") & " on " & Environ("COMPUTERNAME") Can you please let me know what is the equivalent in Access 2007 |
Thread Tools | |
Display Modes | |
|
|