PC Review


Reply
Thread Tools Rate Thread

Diary Notes Date/Time

 
 
Guy
Guest
Posts: n/a
 
      5th Aug 2008
Hi All,

Just want to set up a ctrl key combination to insert the username and a date
stamp at the current insertion point in the textbox such as:

Fred 4-Jul-08:

Leaving the insertion point at the end of the line ready for the user to
start typing.

Diary notes are generally added to the start of the multiline textbox so
that the most recent note is at the top as in:

Fred 4-Jul-08: Phoned Julie in Operations and arranged a date and time to
pick up the dry cleaning.
Dave 21-Jun-08: Phoned Alice in Accounts to advise them that their account
was 30 days overdue. Alice said payment will be processed in next cheque run
due Wed.

And so on.

No problem achieving the timestamp using either an AutoKey that runs code to
build and insert the text into the current active control (if it is a
textbox) or alternatively using the keypress event on the control itself.

The problem I have is setting the insertion point.

I have tried Sendkeys "{End}" and various other combinations but can't get
it to work. Probably missing something obvious, but can anyway help?

Guy
 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      5th Aug 2008
Hi,
you can try something like this:

with screen.activecontrol
.SelStart = Len(.Text)
end with

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com

"Guy" <(E-Mail Removed)> wrote in message
news:81CC039D-E651-4AA2-8E31-(E-Mail Removed)...
> Hi All,
>
> Just want to set up a ctrl key combination to insert the username and a
> date
> stamp at the current insertion point in the textbox such as:
>
> Fred 4-Jul-08:
>
> Leaving the insertion point at the end of the line ready for the user to
> start typing.
>
> Diary notes are generally added to the start of the multiline textbox so
> that the most recent note is at the top as in:
>
> Fred 4-Jul-08: Phoned Julie in Operations and arranged a date and time to
> pick up the dry cleaning.
> Dave 21-Jun-08: Phoned Alice in Accounts to advise them that their account
> was 30 days overdue. Alice said payment will be processed in next cheque
> run
> due Wed.
>
> And so on.
>
> No problem achieving the timestamp using either an AutoKey that runs code
> to
> build and insert the text into the current active control (if it is a
> textbox) or alternatively using the keypress event on the control itself.
>
> The problem I have is setting the insertion point.
>
> I have tried Sendkeys "{End}" and various other combinations but can't get
> it to work. Probably missing something obvious, but can anyway help?
>
> Guy


 
Reply With Quote
 
Guy
Guest
Posts: n/a
 
      5th Aug 2008
Alex,

Brilliant,

..SelStart = Len(.Text)

Where .Text is the length of the date stamp, works like a charm.

Kind Regards,
Guy

"Alex Dybenko" wrote:

> Hi,
> you can try something like this:
>
> with screen.activecontrol
> .SelStart = Len(.Text)
> end with
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://accessblog.net
> http://www.PointLtd.com
>
> "Guy" <(E-Mail Removed)> wrote in message
> news:81CC039D-E651-4AA2-8E31-(E-Mail Removed)...
> > Hi All,
> >
> > Just want to set up a ctrl key combination to insert the username and a
> > date
> > stamp at the current insertion point in the textbox such as:
> >
> > Fred 4-Jul-08:
> >
> > Leaving the insertion point at the end of the line ready for the user to
> > start typing.
> >
> > Diary notes are generally added to the start of the multiline textbox so
> > that the most recent note is at the top as in:
> >
> > Fred 4-Jul-08: Phoned Julie in Operations and arranged a date and time to
> > pick up the dry cleaning.
> > Dave 21-Jun-08: Phoned Alice in Accounts to advise them that their account
> > was 30 days overdue. Alice said payment will be processed in next cheque
> > run
> > due Wed.
> >
> > And so on.
> >
> > No problem achieving the timestamp using either an AutoKey that runs code
> > to
> > build and insert the text into the current active control (if it is a
> > textbox) or alternatively using the keypress event on the control itself.
> >
> > The problem I have is setting the insertion point.
> >
> > I have tried Sendkeys "{End}" and various other combinations but can't get
> > it to work. Probably missing something obvious, but can anyway help?
> >
> > Guy

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time and date stamping notes Steve Bochner Microsoft Outlook Contacts 1 17th Feb 2008 06:17 PM
Problems with date and time on Notes. Chris Mitchell Microsoft Outlook 5 5th Oct 2007 06:15 AM
Keeping Notes When Rescheduling Time and Date =?Utf-8?B?SGVhdGhlckw=?= Microsoft Outlook Calendar 0 6th Feb 2007 04:44 PM
Date/time bug in BCM Business Notes? George Microsoft Outlook BCM 3 3rd Mar 2005 01:45 AM
Is date/time changeable in BCM Notes? George Microsoft Outlook BCM 1 31st Dec 2004 12:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:06 AM.