×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Module Function not availabe in expression builer

Module Function not availabe in expression builer

Module Function not availabe in expression builer

(OP)
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.

RE: Module Function not availabe in expression builer

   
How about simple:

CODE

MsgBox Environ$("username")

Have fun.

---- Andy

RE: Module Function not availabe in expression builer

(OP)
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.

RE: Module Function not availabe in expression builer

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

RE: Module Function not availabe in expression builer

(OP)
Thanks Duane,
For pointing me in the right direction.

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

Thanks

Ed  

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close