By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,124 Members | 1,945 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,124 IT Pros & Developers. It's quick & easy.

How to put date created from command button into table

P: n/a
I have a button PutDate on a form "Company" that put the current date
in the Notes field:

Private Sub PutDate_Click()
Me!ModDate = Date
Me.Refresh

If Len(Me.Notes & "") 0 Then
Me.Notes = Me.Notes & vbCrLf & Format(Date, "dd-mm-yyyy") & " ------ "
End If
If Len(Me.Notes & "") = 0 Then
Me.Notes = Me.Notes & Format(Date, "dd-mm-yyyy") & " ------ "
End If

Notes.SetFocus
Notes.SelStart = Len(Notes.Value)
End Sub

Now my question: I also want to have this value (the date) put in a
column of a table which name "Company". How to perform that? (In
mentioned table all data from the same form are added.)

In my opinion it should not be so difficult.

Access 2003.

Oct 16 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
AA Arens wrote:
I have a button PutDate on a form "Company" that put the current date
in the Notes field:

Private Sub PutDate_Click()
Me!ModDate = Date
Me.Refresh

If Len(Me.Notes & "") 0 Then
Me.Notes = Me.Notes & vbCrLf & Format(Date, "dd-mm-yyyy") & " ------ "
End If
If Len(Me.Notes & "") = 0 Then
Me.Notes = Me.Notes & Format(Date, "dd-mm-yyyy") & " ------ "
End If

Notes.SetFocus
Notes.SelStart = Len(Notes.Value)
End Sub

Now my question: I also want to have this value (the date) put in a
column of a table which name "Company". How to perform that? (In
mentioned table all data from the same form are added.)

In my opinion it should not be so difficult.

Access 2003.
Hi,

Is your form "Company" based on the table "Company"? Is the column of
table "Company", that you want to put the date in, part of your form
"Company"? If yes then of course it would be something like:

Me.Column=Date

.... as with ModDate and Notes.

Hope that helps,
Stephan

Oct 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.