CurrentUser() Function for Deafult Value

CurrentUser() Function for Deafult Value

am 28.10.2007 21:33:26 von PowerLifter1450

Hi all, I have fields in my tables which get updated to the UserName
when someone inserts/updates records through a form. However, I have
created append queries that are importing records to the tables from
an external data source. I would like to have Default value of the
UserName field filled in as the current user for each of the appended
record, however that default value in the table design do not take the
CurrentUser() function. Is there a way to get around this? Thanks for
your help,

--Eric

Re: CurrentUser() Function for Deafult Value

am 28.10.2007 21:40:32 von Bob Quintal

"PowerLifter1450@gmail.com" wrote in
news:1193603606.936197.220570@k79g2000hse.googlegroups.com:

> Hi all, I have fields in my tables which get updated to the
> UserName when someone inserts/updates records through a form.
> However, I have created append queries that are importing records
> to the tables from an external data source. I would like to have
> Default value of the UserName field filled in as the current user
> for each of the appended record, however that default value in the
> table design do not take the CurrentUser() function. Is there a
> way to get around this? Thanks for your help,
>
> --Eric
>
If you are using a query, put the function into the query as a
calculated field.

Alternatively, Windows usually sets the username environment string
to the current user, and the environ("username") does work in an
Access table definition..


--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Re: CurrentUser() Function for Deafult Value

am 28.10.2007 23:10:09 von PowerLifter1450

On Oct 28, 4:40 pm, Bob Quintal wrote:
> "PowerLifter1...@gmail.com" wrote innews:1193603606.936197.220570@k79g2000hse.googlegroups.com :
>
> > Hi all, I have fields in my tables which get updated to the
> > UserName when someone inserts/updates records through a form.
> > However, I have created append queries that are importing records
> > to the tables from an external data source. I would like to have
> > Default value of the UserName field filled in as the current user
> > for each of the appended record, however that default value in the
> > table design do not take the CurrentUser() function. Is there a
> > way to get around this? Thanks for your help,
>
> > --Eric
>
> If you are using a query, put the function into the query as a
> calculated field.
>
> Alternatively, Windows usually sets the username environment string
> to the current user, and the environ("username") does work in an
> Access table definition..
>
> --
> Bob Quintal
>
> PA is y I've altered my email address.
>
> --
> Posted via a free Usenet account fromhttp://www.teranews.com

The calculated field in the Append Query works perfectly; don't know
why I didn't think of that! Thanks a lot !!

--Eric