Compare two tables

YoungWolf

New member
Local time
Today, 12:24
Joined
Dec 20, 2010
Messages
6
Hey everyone,
I've hit a wall in making my database and was hoping someone would have a solution.

So I have 2 tables:
1. Employees
2. Transaction Log

Employees has the names of employees with information like addresses and phone numbers

Transaction log is linked to a dba file that is generated by an access control system (office door opens with a keycard) that has the employee names and the date and time they entered the building .

Now what i idealy wanted to achieve was to have a weekly or even monthly table that every day it can tell me who is in and who isn't , kind of like an attendance list so i figured i would compare the 2 existing table and apend a "yes or no" to a third table, but i couldnt figure out where to start.

Any advice?

Thanks!
 
You want to use a form to display the info you want, not a table.
Tables store the raw data. Tables/Queries/Reports assemble the data.

Table1 - Employee details
EmloyeeName (PK)
EmloyeeAddress
EmloyeePhone

Table2 - Key card numbers. Employees loose/break cards. You want to match a card to an employee.
KeyCardNumber (PK)
EmployeeName (FK from Table1)

Table3 - Access log
KeyCardUsed (PK from Table2)
Date/Time
In/Out

Form1 - Use a query to get date from tables
EmployeeName (from table1)
Date/Time 9from (table3)
In/Out (from table3)

Code the query so that it only shows the last event of a card. This will then give the emloyee name and whether they were in or out.
 
thanks alot, for the response, youve helped me get on the right track i believe
so what youre saying is that im supposed to have a third table saying the employee name with the keycard number, and then do a query to show employee name and the date.

Sorry im a bit of a newbie at this stuff, how would i make the query to say if the name is on the access log table then show a "yes" in the form or a "no" if their not .
 

Users who are viewing this thread

Back
Top Bottom