473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to make button filling in the present date in a data field

I have a field "Notes" and I would like to have a button in the
vicinity doing the following:

It goes to the end of the present text, already filled in the
Note-field, performs a [Return] and put in the present date.

NOTES-field:

text
text
text [return]
13-07-2005 new text

Nov 13 '05 #1
7 1476
AA Arens wrote:
I have a field "Notes" and I would like to have a button in the
vicinity doing the following:

It goes to the end of the present text, already filled in the
Note-field, performs a [Return] and put in the present date.

NOTES-field:

text
text
text [return]
13-07-2005 new text


Me.Notes = Me.Notes & vbCrLf & Format(Date, "dd-mm-yyyy")

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2
Rick,

It works, how to also have the cursor positioned, after the button push
like 12-04-2005 |
Thank you.

Nov 13 '05 #3

AA Arens wrote:
Rick,

It works, how to also have the cursor positioned, after the button push
like 12-04-2005 |
Thank you.


To get what you show, add
& " "
to what Rick posted. Then use SelStart. Access drops trailing spaces
in textboxes but spaces added using code seem to stay.

James A. Fortune

Nov 13 '05 #4
James,

I am not so familiair with the VB script. Could you give me a push
toward it. I know how to access it, but not how to make the script for
this issue. I already took the Help but the explenation is not
sufficient.
Can it be put below the
Me.Notes = Me.Notes & vbCrLf & Format(Date, "dd-mm-yyyy")" " script?

Nov 13 '05 #5
Me.Notes = Me.Notes & vbCrLf & Format(Date, "dd-mm-yyyy") & " "

Nov 13 '05 #6
Just want to know how to also have the mouse pointer moved to the back
of the date appeared in the field.
My mousepointer is at the button at that moment.

Bart

Nov 13 '05 #7
AA Arens wrote:
Just want to know how to also have the mouse pointer moved to the back
of the date appeared in the field.
My mousepointer is at the button at that moment.

Bart


The formatted date plus added space makes 11 characters.

You'll need something like (air-code):

Me.Notes = Me.Notes & vbCrLf & Format(Date, "dd-mm-yyyy") & " "
Notes.SetFocus
Notes.SelStart = Len(Notes.Value) - 11

That should put the cursor at the beginning of the line containing the
date. Also, thanks to BillCo for answering your question when I wasn't
available.

James A. Fortune

Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: hennakapoor | last post by:
How do the form filling software determine which text field gets what data i.e. a typical form filling software will ask the user to enter the username / address / password etc. Whenever it goes to...
4
by: mitch-co2 | last post by:
What I am trying to do is when someone clicks on the YES radio button I want the text field called MYTEXT to equal the text field named DATE. The below code works as long as I do NOT UN-COMMENT...
4
by: Neil Coleclough | last post by:
I am constructing a database to process product returns for my Company. I have a number of toggle buttons to identify the stage to which each return has been processed. For example, clicking the...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
1
by: cindy | last post by:
this is the call private void Page_Load(object sender, System.EventArgs e) { OdbcConnection connection = new OdbcConnection ("DSN=PFW52"); CreateDataAdapter(connection); } this is the code,...
10
by: AA Arens | last post by:
I do have a database with customer info in it. To avoid it will be taken out of our office, is it possible to make it not-readable after a certain period? then every let say seven days, I needs to...
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
2
by: Hrvoje Vrbanc | last post by:
Hello all! As I have only recently started to use native ASP.NET 2.0 data access controls (and found them to be very powerful), I have one question that I was unable to find the answer to: -...
8
by: Greg (codepug | last post by:
For lack of the proper expression, how do I excite a control to cause events to trigger. I have a date control and am using a calender form button to fill the text box with the date. The text box...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.