A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hot key's



 
 
Thread Tools Display Modes
  #1  
Old June 8th, 2004, 03:12 AM
Antonio
external usenet poster
 
Posts: n/a
Default Hot key's

I have a database that has several forms used for various
applications involving the entering of a date in one of
the forms various fields. I was wondering if it was
possible to do the following-
A form is opend by the user containing 4 fields. The
first two fields are "Date" (start and end)fields and the
last two fields are "Time" (start and end) fields. When
the first field has the focus, I would like the user to
be able to hit "T" on their key board and it enter
today's date "Date()". If they hit "Y" they it would
enter yesterdays date. This would be the case when the
first two fields have the focus. When the second two
fields get the focus, hitting "N" on the key board would
enter the current time.
Is this possible?
TIA

  #2  
Old June 8th, 2004, 04:27 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default Hot key's

Check Access VB Help on the KeyDown or KeyPress Event,
IIRC, you should be able to use one of these Events to
assign the value to the Control.

There are some inbuilt shortcuts you can also use:

Ctrl + ; gives today's date
Ctrl + Shift + : gives current time.

HTH
Van T. Dinh
MVP (Access)




-----Original Message-----
I have a database that has several forms used for various
applications involving the entering of a date in one of
the forms various fields. I was wondering if it was
possible to do the following-
A form is opend by the user containing 4 fields. The
first two fields are "Date" (start and end)fields and the
last two fields are "Time" (start and end) fields. When
the first field has the focus, I would like the user to
be able to hit "T" on their key board and it enter
today's date "Date()". If they hit "Y" they it would
enter yesterdays date. This would be the case when the
first two fields have the focus. When the second two
fields get the focus, hitting "N" on the key board would
enter the current time.
Is this possible?
TIA

.

  #3  
Old June 8th, 2004, 08:00 AM
external usenet poster
 
Posts: n/a
Default Hot key's


-----Original Message-----
Check Access VB Help on the KeyDown or KeyPress Event,
IIRC, you should be able to use one of these Events to
assign the value to the Control.

There are some inbuilt shortcuts you can also use:

Ctrl + ; gives today's date
Ctrl + Shift + : gives current time.

HTH
Van T. Dinh
MVP (Access)


Thanks for the response.
I took a look at the KeyDown/KeyPress event, and I have
been able to specify changing the value to Date(), but
only with the Tab, Shift, Ctl, Alt keys. I dont see a way
to specify the "T" key and not the others.
Antonio
-----Original Message-----
I have a database that has several forms used for

various
applications involving the entering of a date in one of
the forms various fields. I was wondering if it was
possible to do the following-
A form is opend by the user containing 4 fields. The
first two fields are "Date" (start and end)fields and

the
last two fields are "Time" (start and end) fields. When
the first field has the focus, I would like the user to
be able to hit "T" on their key board and it enter
today's date "Date()". If they hit "Y" they it would
enter yesterdays date. This would be the case when the
first two fields have the focus. When the second two
fields get the focus, hitting "N" on the key board

would
enter the current time.
Is this possible?
TIA

.

.

  #4  
Old June 8th, 2004, 08:03 AM
Antonio
external usenet poster
 
Posts: n/a
Default Hot key's

Thanks for the response.
I took a look at the KeyDown/KeyPress event, and I have
been able to specify changing the value to Date(), but
only with the Tab, Shift, Ctl, Alt keys. I dont see a way
to specify the "T" key and not the others.
Antonio


-----Original Message-----
Check Access VB Help on the KeyDown or KeyPress Event,
IIRC, you should be able to use one of these Events to
assign the value to the Control.

There are some inbuilt shortcuts you can also use:

Ctrl + ; gives today's date
Ctrl + Shift + : gives current time.

HTH
Van T. Dinh
MVP (Access)




-----Original Message-----
I have a database that has several forms used for

various
applications involving the entering of a date in one of
the forms various fields. I was wondering if it was
possible to do the following-
A form is opend by the user containing 4 fields. The
first two fields are "Date" (start and end)fields and

the
last two fields are "Time" (start and end) fields. When
the first field has the focus, I would like the user to
be able to hit "T" on their key board and it enter
today's date "Date()". If they hit "Y" they it would
enter yesterdays date. This would be the case when the
first two fields have the focus. When the second two
fields get the focus, hitting "N" on the key board

would
enter the current time.
Is this possible?
TIA

.

.

  #5  
Old June 8th, 2004, 12:23 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default Hot key's

Private Sub Text0_KeyPress(KeyAscii As Integer)
If Chr(KeyAscii) = "t" Then
KeyAscii = 0
Me.Text0.Value = Date
End If
End Sub

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)


"Antonio" wrote in message
...
Thanks for the response.
I took a look at the KeyDown/KeyPress event, and I have
been able to specify changing the value to Date(), but
only with the Tab, Shift, Ctl, Alt keys. I dont see a way
to specify the "T" key and not the others.
Antonio


-----Original Message-----
Check Access VB Help on the KeyDown or KeyPress Event,
IIRC, you should be able to use one of these Events to
assign the value to the Control.

There are some inbuilt shortcuts you can also use:

Ctrl + ; gives today's date
Ctrl + Shift + : gives current time.

HTH
Van T. Dinh
MVP (Access)




-----Original Message-----
I have a database that has several forms used for

various
applications involving the entering of a date in one of
the forms various fields. I was wondering if it was
possible to do the following-
A form is opend by the user containing 4 fields. The
first two fields are "Date" (start and end)fields and

the
last two fields are "Time" (start and end) fields. When
the first field has the focus, I would like the user to
be able to hit "T" on their key board and it enter
today's date "Date()". If they hit "Y" they it would
enter yesterdays date. This would be the case when the
first two fields have the focus. When the second two
fields get the focus, hitting "N" on the key board

would
enter the current time.
Is this possible?
TIA

.

.



  #6  
Old June 8th, 2004, 12:54 PM
Antonio
external usenet poster
 
Posts: n/a
Default Hot key's

Van, Doug, Thank you both very much for your help.


-----Original Message-----
Private Sub Text0_KeyPress(KeyAscii As Integer)
If Chr(KeyAscii) = "t" Then
KeyAscii = 0
Me.Text0.Value = Date
End If
End Sub

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)


"Antonio" wrote in

message
...
Thanks for the response.
I took a look at the KeyDown/KeyPress event, and I have
been able to specify changing the value to Date(), but
only with the Tab, Shift, Ctl, Alt keys. I dont see a

way
to specify the "T" key and not the others.
Antonio


-----Original Message-----
Check Access VB Help on the KeyDown or KeyPress Event,
IIRC, you should be able to use one of these Events to
assign the value to the Control.

There are some inbuilt shortcuts you can also use:

Ctrl + ; gives today's date
Ctrl + Shift + : gives current time.

HTH
Van T. Dinh
MVP (Access)




-----Original Message-----
I have a database that has several forms used for

various
applications involving the entering of a date in one

of
the forms various fields. I was wondering if it was
possible to do the following-
A form is opend by the user containing 4 fields. The
first two fields are "Date" (start and end)fields and

the
last two fields are "Time" (start and end) fields.

When
the first field has the focus, I would like the user

to
be able to hit "T" on their key board and it enter
today's date "Date()". If they hit "Y" they it would
enter yesterdays date. This would be the case when

the
first two fields have the focus. When the second two
fields get the focus, hitting "N" on the key board

would
enter the current time.
Is this possible?
TIA

.

.



.

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.