Sign In/Sign Out

K

Kristen

I'm looking for either a little help getting started or a
template that would help to develop a login/logout
program for a science lab at a high school

As students arrive, they need to login with first name,
student ID and reason for their visit (chemistry,
biology, general science, etc). Once they are finished
in the lab, they should log back out.

We need to be able to run reports that show usage by day,
by time and by student.

Any guidance would be greatly appreciated!
 
P

PC Datasheet

Two ways you might do this:
1. If the students have studentID cards, swipe the cards to both login and
logout.
2. If they don't have cards, then a keypad would work where they enter there
studentID.

PC Datasheet
(e-mail address removed)
 
P

PC Datasheet

You need the following tables:

TblStudent
StudentID
FirstName
MI
LastName

TblLabReason
LabReasonID
LabReason

TblLoginLogout
LoginLogoutID
LogInLogOut
StudentID
LoginLogoutDate
LabReason

Build TblLabReason carefully so your data looks like:
1 Chemistry
2 Biology
3 General Science

Build a popup form based on TblLoginLogout.
1. Put this code in the OnOpen event of the form:
DoCmd.GoToRecord,,acNewRec
Me!StudentID.SetFocus
2. Put a hidden (not visible) textbox on the form, name it LogInLogOut and make
it bound to LoginLogout.
3. Put two buttons on the form and make the caption of one Login and the
caption of the other Logout
4. Put this code in the OnClick event of the Login button:
Me!LoginLogOut = 1
5. Put this code in the OnClick event of the Login button:
Me!LoginLogOut = 2
6. Create a listbox on the form and name it LabReason and make it bound to
LabReason.. Base the listbox on TblLabreason, make the bound column 1, Columns
Count property 2 and Columns Width property 0;1.5. Add a label to the listbox
that says "Click on the reason you are using the lab"
7. Put a hidden (not visible) textbox on the form, name it StudentID and make
it bound to StudentID.
8. Put this code in the BeforeUpdate event of the StudentID textbox:
If IsNull(Me!LoginLogout) Then
MsgBox "Press either the Login or Logout button",,"Must login or logout
first"
Cancel = True
Exit Sub
End If
If IsNull(LabReason) Then
MsgBox "Click on the reason you are using the lab",,"You have not entered
the reason you are using the lab"
Cancel = True
Exit Sub
End If
Me!LoginLogoutDate = Now()
DoCmd.GoToRecord,,acNewRec

The card swiper must be setup to read the StudentID off the StudentID card and
send it to the form on the screen.

Steve
PC Datasheet
Your Resource For Help With Access, Excel And Word
 

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