View Single Post
  #8  
Old March 26th, 2009, 07: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