Prev: Combo Box to write to table(s)
Next: Overflow
From: PJ on 25 May 2010 12:40 I have the following code in a memo text field: Private Sub txtNotesOnTransaction_BeforeUpdate(Cancel As Integer) Debug.Print "User: " & CurrentUser() & " " & Me!txtNotesOnTransaction End Sub I want the current user entering data user name to fill in before typing any other data. It is not working any suggestions? Thanks!!
From: Douglas J. Steele on 25 May 2010 12:55 What does "not working:" mean in this context? Are you getting an error? If so, what's the error? If you're not getting an error, what are you getting (and what do you want to get instead)? -- Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/DJSteele (no e-mails, please!) "PJ" <PJ(a)discussions.microsoft.com> wrote in message news:88CE838A-8D16-4A5F-AFAA-A09BD35DCA9F(a)microsoft.com... >I have the following code in a memo text field: > > Private Sub txtNotesOnTransaction_BeforeUpdate(Cancel As Integer) > Debug.Print "User: " & CurrentUser() & " " & Me!txtNotesOnTransaction > End Sub > > I want the current user entering data user name to fill in before typing > any > other data. > > It is not working any suggestions? > > Thanks!!
From: Daryl S on 25 May 2010 13:03 PJ - Use the On Enter method instead of the On Update method, and put in code like this: If isnull(Me!txtNotesOnTransaction) Then Me!txtNotesOnTransaction = CurrentUser() End If -- Daryl S "PJ" wrote: > I have the following code in a memo text field: > > Private Sub txtNotesOnTransaction_BeforeUpdate(Cancel As Integer) > Debug.Print "User: " & CurrentUser() & " " & Me!txtNotesOnTransaction > End Sub > > I want the current user entering data user name to fill in before typing any > other data. > > It is not working any suggestions? > > Thanks!!
From: PJ on 25 May 2010 13:41 Thank Daryl, It worked can a date be added after the user name? If so, how would that look. Thanks again!! "Daryl S" wrote: > PJ - > > Use the On Enter method instead of the On Update method, and put in code > like this: > > If isnull(Me!txtNotesOnTransaction) Then > Me!txtNotesOnTransaction = CurrentUser() > End If > > -- > Daryl S > > > "PJ" wrote: > > > I have the following code in a memo text field: > > > > Private Sub txtNotesOnTransaction_BeforeUpdate(Cancel As Integer) > > Debug.Print "User: " & CurrentUser() & " " & Me!txtNotesOnTransaction > > End Sub > > > > I want the current user entering data user name to fill in before typing any > > other data. > > > > It is not working any suggestions? > > > > Thanks!!
From: PieterLinden via AccessMonster.com on 25 May 2010 14:04
PJ wrote: >Thank Daryl, It worked can a date be added after the user name? If so, how >would that look. > >Thanks again!! > >> PJ - >> >[quoted text clipped - 17 lines] >> > >> > Thanks!! If isnull(Me!txtNotesOnTransaction) Then Me!txtNotesOnTransaction = CurrentUser() & " " & Now() End If -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1 |