Find a particular record??

jonnyuk3

Registered User.
Local time
Today, 20:18
Joined
May 29, 2008
Messages
11
Hi,

I am trying to create a basic clocking in/clocking out system.

I currently have two tables, these being:

1. Holds the employee information, employee number, name etc. The key being the employee number.
2. Holds the clocking in/out information. The key being the date and time the employee clocked in.

We have around 100 hundred employees and i need to be able to enter an employee number in a text box which then populates the rest of the form with data from the employee table and from the clocking in/out table.

I am currently using a combo box to do this but the list in the combo box is quite large and employees are quite often using the combo box to clock each other in and out.

I know that using a text box won't prevent them from clocking each other in and out but if would at least prevent them from seeing the list of other employee numbers.

Is there a way to do this? Any help would be much appreciated.

jonnyuk3
 
Simple Software Solutions

Are your employees aware that clocking in or out for another person is classed as gross misconduct:eek:

The only way to overcome this is to issue employees with passwords.

Passwords are like toothbrushes....

Every one should have one
You should keep them to your self
You should change them regular.

CodeMaster::cool:
 
Why not create a different form for the log in/out function? That form would not have the cbo and you could still use the cbo for the rest of the office functions.

Also, I was able to successfully carry this off without people logging on/off other people by using the employee's electronic door key as the device to log them on/off. If they forgot their key, they had to go by security to get a temporary replacement that they could log in/out with. Same concept would work with a simple bar code setup.
 
Hi,

Thanks for your replies.

I want to get away from using the combo box altogether.
I just want the users to enter an empoyee number into a text box, the database then goes off and finds their record and displays their information on the form.

I think I would be able to do this using VBA, but I dont have the knowledge on how this would be achievable.

Could you point me in the right direction.

jonnyuk3
 
Simple Software Solutions

Security issues aside, you will need a mainform/subform setup. You main form will act as the find me section, the subform will contain the information about the employee. When you embed the subform it has properties called LinkedChildControl and LinkedMasterControl In these place the name of the control on the main form and enter the name of the related control that appears on the sub form. This will then tie them together.

CodeMaster::cool:
 
You could do it by a parameter query based on the number entered by the employee.

You could make the record source for the form a query with one record and so whe the form is opened it will have this record. This record would be a dummy record.

The employee would enter their number in an unbound text box and then change the record source to the parameter query. For the parameter query you enter in the criteria [forms]![FormName]![TextboxName]

When the form opens you could have a hidden unbound text box where the value is inserted that would be used a for another parameter query and that query would select the dummy record that was the same as when the form was opened.

You could also have the form where the fields are not enabled when it opens but enabled when the empoyee runs the parameter query and become unenabled when they run the parameter query to return to the dummy record.

A simple macro or code runs the change recordsource.

For a macro use SetValue action and the Item would be [Forms]![Formname].[RecordSource] and the Expression "queryname"

Code would be Forms![Formname].RecordSource = "queryname"
 

Users who are viewing this thread

Back
Top Bottom