A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Default value in table field (username and computername)



 
 
Thread Tools Display Modes
  #1  
Old March 25th, 2009, 10:19 PM posted to microsoft.public.access.tablesdbdesign
Mario
external usenet poster
 
Posts: 115
Default 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  
Old March 25th, 2009, 11:01 PM posted to microsoft.public.access.tablesdbdesign
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default 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  
Old March 26th, 2009, 12:55 AM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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  
Old March 26th, 2009, 01:16 AM posted to microsoft.public.access.tablesdbdesign
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default 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  
Old March 26th, 2009, 01:16 PM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default 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  
Old March 26th, 2009, 06:11 PM posted to microsoft.public.access.tablesdbdesign
Mario
external usenet poster
 
Posts: 115
Default 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  
Old March 26th, 2009, 06:41 PM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default 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  
Old March 26th, 2009, 08:03 PM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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  
Old March 26th, 2009, 08:14 PM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default 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  
Old March 26th, 2009, 08:48 PM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:46 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.