473,473 Members | 2,100 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to put date created from command button into table

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
1 3666
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Robin Lawrie | last post by:
Hi again, another problem! I've moved from an Access database to SQL server and am now having trouble inserting dates and times into seperate fields. I'm using ASP and the code below to get the...
6
by: BlackFireNova | last post by:
Using Access 2002 I am writing a report which draws data from several different tables. I can't link all the tables in a query, as some can not be related without truncating the data. I plan...
1
by: Miranda Evans | last post by:
In my application, a text box control resides in a form. The text box control is unbound, but--assuming all edits are passed when the user click a command button on the form--the contents of the...
2
by: R Duke | last post by:
I have tried everything I can think of to change the visible property of a design time created control from a dynamically created control's command event handler. Here is the scenario. I have...
14
by: peteh | last post by:
Hi All; We have many production jobs that "load from cursor" to a UDB/AIX 8.2 (with dpf) data warehouse from source tables residing Oracle 9i. Since Oracle dates are (roughly) equivalent to DB2...
9
by: AA Arens | last post by:
A) I have a button on my form. By a push, I want to fill present date and time in the two rows of the table. Form Name: Company Table Name: Company consists Company ID as primary key, and...
8
by: nishkrish | last post by:
Hi, I am new to access I created the form and report from Allen Browne's Frmwhat Date the way he has described but when i preview report it shows StartDate: name? Enddate: name? am i suppose...
1
by: ndeeley | last post by:
Okay... I've created a drop down list fed by a table. I want my users to select an item in the list, say `Awaiting Repairs`, then fill in a single date text field. When a command button is pressed...
5
by: Greg (codepug | last post by:
I have a table that contains a field called RDATE (reminder date). Dates are optionally entered to remind a user of an upcoming event. I have a reminder button that launches a popup form, and a...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.