Re: CurrentUser() Function for Deafult Value



"PowerLifter1450@xxxxxxxxx" <PowerLifter1450@xxxxxxxxx> wrote in
news:1193603606.936197.220570@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

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

.



Relevant Pages

  • Re: Oracle SQL Injection vulnerability
    ... The SELECT query doesn't seem to be the one you are injecting since ... likely what you put as a username is stored in a session object and is ... username field and injecting the password field with: ...
    (Pen-Test)
  • RE: How to evade white spaces in a SQL injection
    ... The 2nd one is more likely since they're proably adding the ' character to ... So you'd enter '+1-- as the username. ... +1 tells sql to add 1 to a character field, which it can't do, the -- ... comments out the remainder of the query so it doesn't get parsed. ...
    (Pen-Test)
  • RE: Conditional display of records ...
    ... So in my query, I will map 'A' and 'B' for flag='Y' and userid (with which ... users logon) with the userid stored in table 'B'. ... The trick is to create a function that calls the username function and pass ... Function CheckFlag(strFlag As String) As Boolean ...
    (microsoft.public.access.formscoding)
  • RE: Conditional display of records ...
    ... So in my query, I will map 'A' and 'B' for flag='Y' and userid (with which ... users logon) with the userid stored in table 'B'. ... The trick is to create a function that calls the username function and pass ... Function CheckFlag(strFlag As String) As Boolean ...
    (microsoft.public.access.formscoding)
  • Append/copy calling a module switches data
    ... I've taken the SQL from the previous posting (graciously ... When I run the query just by itself it does create a copy and put "dlongton" ... leaving the UserName in the original record as it was ... CreatedBy) in the original record and the newly copied record...it's driving ...
    (microsoft.public.access.queries)