Text Box

P

PJ

I have the following event procedure on a text box:

Private Sub txtNotesOnTransaction_BeforeUpdate(Cancel As Integer)
Debug.Print "User: " & CurrentUser() & " " & Me!txtNotesOnTransaction
End Sub


It is suppose to stamp the user name in the text box but it does not work.

Any suggestions?

Thanks
 
D

Daryl S

PJ -

The debug.print will just display (in the immediate window of the code pane)
the name and the Notes. If you want the notes saved with the name, do this:

Me!txtNotesOnTransaction = "User: " & CurrentUser() & " " &
Me!txtNotesOnTransaction
 
D

Douglas J. Steele

In addition to what Daryl told you, hopefully you know that CurrentUser only
works if you're using a file format from Access 2003 or earlier and you've
applied Access User Level Security. Otherwise, it'll return Admin for all
users.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top