A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Text Box



 
 
Thread Tools Display Modes
  #1  
Old May 21st, 2010, 02:35 PM posted to microsoft.public.access.forms
PJ
external usenet poster
 
Posts: 265
Default Text Box

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
  #2  
Old May 21st, 2010, 03:35 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default Text Box

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


--
Daryl S


"PJ" wrote:

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

  #3  
Old May 21st, 2010, 05:07 PM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Text Box

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.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"PJ" wrote in message
news
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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:19 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.