Want current time to be entered w/double click

G

Guest

I am trying to create a time and attendance form. The form itself has the
employees demographic information and the subform is where their entry
records will be. I do not want the employees to have to physically enter the
actual time I want the time to be entered in the field when they select it.

ie: when the employee has to enter their beginning lunch time they just
double click in the field and the current time will be generated.

I was able to set the default value of the date to Now() to keep the date
current but I need to do the same for the time wih out all fields generating
the exact some time. HELP!!!!
 
F

fredg

I am trying to create a time and attendance form. The form itself has the
employees demographic information and the subform is where their entry
records will be. I do not want the employees to have to physically enter the
actual time I want the time to be entered in the field when they select it.

ie: when the employee has to enter their beginning lunch time they just
double click in the field and the current time will be generated.

I was able to set the default value of the date to Now() to keep the date
current but I need to do the same for the time wih out all fields generating
the exact some time. HELP!!!!

Set the control's Format property to a valid Time format.
Code the control's Double-Click event:

Me![NameOfControl] = Time
 
G

Guest

Am I entering the Me![NameOfControl] = Time as the defualt value or the
validation rule in the design view of the table? Or do I need to figure out
the "name of control" in order to make this work?

fredg said:
I am trying to create a time and attendance form. The form itself has the
employees demographic information and the subform is where their entry
records will be. I do not want the employees to have to physically enter the
actual time I want the time to be entered in the field when they select it.

ie: when the employee has to enter their beginning lunch time they just
double click in the field and the current time will be generated.

I was able to set the default value of the date to Now() to keep the date
current but I need to do the same for the time wih out all fields generating
the exact some time. HELP!!!!

Set the control's Format property to a valid Time format.
Code the control's Double-Click event:

Me![NameOfControl] = Time
 
F

fredg

Am I entering the Me![NameOfControl] = Time as the defualt value or the
validation rule in the design view of the table? Or do I need to figure out
the "name of control" in order to make this work?

fredg said:
I am trying to create a time and attendance form. The form itself has the
employees demographic information and the subform is where their entry
records will be. I do not want the employees to have to physically enter the
actual time I want the time to be entered in the field when they select it.

ie: when the employee has to enter their beginning lunch time they just
double click in the field and the current time will be generated.

I was able to set the default value of the date to Now() to keep the date
current but I need to do the same for the time wih out all fields generating
the exact some time. HELP!!!!

Set the control's Format property to a valid Time format.
Code the control's Double-Click event:

Me![NameOfControl] = Time

Neither.
And NOT in the table.
A Table should not be used for data entry.
Table fields do not have double-click events ( or any user available
events).
Forms do.
This is done on the Time and Attendance form you want to use for data
entry.

And Yes... you do need to figure out the name of the control on the
form.

What is the actual name of the control on the form?
Let's say it's name is "BeginLunchTime" and it is bound to a field in
your table.
Select this control. Show it's property sheet.
Click on the Event tab.
On the line that says Dbl-click write:
[Event Procedure]
Then click on the little button with 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already existing lines of code.
Between those lines, write:

Me![BeginLunchTime] = Time

Exit the code window.
Open the form.

Double-click on this control and the current time will be entered in
it.

Remember to change [BeginLunchTime] to whatever the actual name of
this control is on your form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top