Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Module Function not availabe in expression builer

Status
Not open for further replies.

egstatus

Programmer
Apr 14, 2005
143
US
Hi all.
I am using access 2003. I have a master table that I update daily with detail records we get from different clients.

I am having a problem storing the user name that has the database open to the field: Added_By

I have a function in a module that retrives the window user name. However I can't see this function in the expression builder. Is there an easier or better way of doing this?

Thanks in advance

Ed.
 

How about simple:
Code:
MsgBox Environ$("username")

Have fun.

---- Andy
 
Hi Andy, [by the way I am sorry for misspelling the word builder]

I was thinking more as to put it as the default value.

For example in a date field if you put date() in the default value box; everytime a user add a record the system date gets stored in the field.

I want to do something similar. I have a function getusername(). that returns the user name. However when I bring the expression builder I don't see the fuction. The function is stored on a module.

Any other Ideas?

Thanks

Ed.
 
You can't set the default value of the field in table design to your function. You should be able to do this for a control on a form. You shouldn't be entering data directly into tables so this should not be a significant limitation.

Duane
Hook'D on Access
MS Access MVP
 
Thanks Duane,
For pointing me in the right direction.

I apreciate all the great advice all members of the forum contribute.

Thanks

Ed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top