473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

CurrentUser() Function for Deafult Value

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

Oct 28 '07 #1
2 5323
"Po*************@gmail.com" <Po*************@gmail.comwrote in
news:11**********************@k79g2000hse.googlegr oups.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

Oct 28 '07 #2
On Oct 28, 4:40 pm, Bob Quintal <rquin...@sPAmpatico.cawrote:
"PowerLifter1...@gmail.com" <PowerLifter1...@gmail.comwrote innews:11**********************@k79g2000hse.google groups.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

Oct 28 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: clod | last post by:
for example if I have a box where you should put a date how do I keep today date inside that box as default?
2
by: Mark Flippin | last post by:
I'm converting an Access 2000 database (fe/be) to a SQL Server 2000 backend. This is a quick and dirty conversion, using linked files via a file dsn, and is to be completed ASAP with minimal...
1
by: pkpatil | last post by:
Hi, I recently saw a code with a mix of C & C++, wherein a C++ file was calling a C function dropping the last argument. The code was similar to below:...
5
by: Dax | last post by:
Hi, how can Identify a domain user that send a form made with ASP. I have see that exist a variable called currentuser, but what does it mean? Thanks in advance, Dax
6
by: reidarT | last post by:
How do I get current user logged in with vb.net code? reidarT
27
by: Terry | last post by:
I am getting the following warning for the below function. I understand what it means but how do I handle a null reference? Then how do I pass the resulting value? Regards Warning 1...
2
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if...
10
by: Mourad | last post by:
Hi All, CurrentUser() returns null when called from a form event handler, at least from Form_Open()! However, it works fine in other forms! Use Application.CurrentUser seem to work, but I'd...
3
by: JohnHo | last post by:
This is probably simple but this is the last feature for an db app and I am stumped (read fatigued). I have created users with the Access security feature. Additionally, I have a lookup table...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.