command button

message from =?Utf-8?B?TWlrZQ==?= on 23 May 2004
How do I make a command button place a time/date stamp in a text box each time I click it?
I have the command button placed next to a text box, but I can't seem to make it do what I want it to do.
Can anyone help.
 
Allen Browne replied to =?Utf-8?B?TWlrZQ==?= on 24 May 2004
[Event Procedure]

2. Click the Build button (...) beside this. Access opens the code window.

3. Enter this line in the sub:

Private Sub cmdDate_Click()
Me.[NameOfYourDateFieldHere] = Now()
End Sub
 
=?Utf-8?B?bWlrZQ==?= replied to Allen Browne on 24 May 2004
Thank you for your imput. It worked great, but I need it to do more. I need it to, I guess start a new record also. When I click the button it places it in the text box. However, I need it to place it in the box each time I click it. I am trying to make a note system for when people to call. I will push the button and type what our conversation is. Then if they call tomorrow I will need to time/date stamp it again, but within the same text box. This is so my staff can look up a chart and see all of the conversations together.
 
Allen Browne replied to =?Utf-8?B?bWlrZQ==?= on 25 May 2004
RunCommand acCmdRecordsGotoNew

To insert the date and time when the new record was created, just set the
Default Value property of the text box to:
=Now()
 
=?Utf-8?B?TWlrZQ==?= replied to Allen Browne on 24 May 2004
I don't want it to create a new record. I want it to go to a new line in the same record. It should look like this if this is a text box.

5/24/2004 11:06:29 AM
Called and left message

5/24/2004 11:16:29 AM
Cheryl returned my message. Stating that I will make a payment

6/24/2004 11:06:29 AM
Called Cheryl reguarding non payment, told her I would have to send it to collections.

This would all be in one record for the same person. I have made a form with tabs. The first page is the customer and the second page is the notes for any correspondances.
 
Brian Kastel replied to =?Utf-8?B?TWlrZQ==?= on 24 May 2004
PMFJI, but aside from the dubious design of your encounters tracking, you
could simply use code to append the DTS to what I am assuming is a memo
field containing your notes.

Private Sub Command1_Click()

With Me.MemoField
.SetFocus
.Text = .Text & vbCrLf & vbCrLf & Now
.SelStart = Len(.Text)
.SelLength = 0
End With

End Sub

"Mike" <anonymous@discussions.microsoft.com> wrote in message
news:68C35BC3-5900-4449-862F-046AFCEE501D@microsoft.com...
the same record. It should look like this if this is a text box.
with tabs. The first page is the customer and the second page is the notes
for any correspondances.
 

Archived message: command button (MS Access)