Entering a value

  • Thread starter Thread starter Jim Jennings
  • Start date Start date
J

Jim Jennings

My question is hopefully simple to answer, but it has
plagued me for weeks. I simply can not figure out how to
set a form to which a user enters information and the
related record displays.

Specifically, I am creating a TimeClock form. The form
requests the employee's ID. Currently, the employee will
enter their ID and press enter. This should poplulate a
table (tlbTimeClock) with EmployeeID (user entry),
DateScanned using date(), & TimeScanned using time()

The subform is a query (qryTimeClock) which relates
(tblTimeClock) to (tblEmployees) in order to display the
employee's name and insure them they have clocked in
correctly.

I can provide any information as well as 'bells &
whistles' to the form as soon as I can understand the
basic fundamental of how to get this to work.

Thanks for any assistance.

Jim
 
The subform is used just to show the employee's name? A bit of overkill if
yes.

Sounds as if you're asking user to type in an ID? Why not use a combo box
that displays employee names (with or without IDs) and let employee select
his/her name? Then you could use a combo box - text box combination as
described at The ACCESS Web to show the employee name after the user selects
the name:
http://www.mvps.org/access/forms/frm0058.htm
 
If the employees are on network or intranet where they need to log in, you
can access the UserName environment variable using Environ("USERNAME").
With an intermediate table that provides a foreign key that links the
usernames to the emloyees' names, no one will need to key in an employee ID,
you can just have the form "recognize" the user when it is opened.

Paul Johnson
 
I don't want to use a combo box 1) because I don't want
employees to have to scroll through dozens of names to
find theirs & 2) I don't want employees clocking in and
out other employees.

If I had scan cards and used a magnetic reader to input
the information, it would still have to be a number that
is input.

My question is how to accept an inputted value. I do not
want to know a way around this.

Thanks.
 
How will you prevent an employee from entering someone else's ID? Avoiding
combo box doesn't prevent that. Also, with autocomplete feature of combo
box, a user can begin typing the name and the combo box will find the first
match of the entered characters; no need to scroll all the way through to
get to the name.

But, if you want user to type an ID into a textbox and then want to show
that the user has entered the "correct" ID, put two textboxes on the form
(name the first one txtID, the second one txtName). Put this expression in
for the control source of txtName control:
=DLookup("EmployeeNameField", "EmployeeTable", "[EmployeeID]=" &
[txtID])
 
Back
Top