M
Me
I am almost there with John's help.
At one point when I put in the student ID it would just more all the
student information up one
I am a teacher and I would like to scan ID numbers from student ID's
to only allow students that belong in my lunch in and keep the ones
that don't belong in there out.
I pulled a list of students into Access I have a barcode scanner to
scan the student ID number into the computer which I have working. I
want to scan the students ID cards with a barcoded ID number and bring
up the students name, class, grade and lunch.
The Table contains #-Primary Key | Student ID | Last Name | First Name
| Grade | HR | Lunch | Class
I have a form as per John W. Vinson directions I have a form with text
boxes
Student ID Text box name txtStudentID control source Student ID
Lunch Text box name TxtLunch control source Lunch
First Name Text box name TxtFirstName control source First Name
Last Name Text box name TxtLastName control source Last Name
Grade Text box name TxtGrade control source Grade
Class Text box name TxtClass control source Class
And and Unbound text box ID Scan TxtIDScan
This is the code John gave me
In this textbox's AfterUpdate event put the following VBA code. Click
the ... icon by the After Update line on the Events tabl of the
textbox's properties:
Private Sub txtStudentID_AfterUpdate()
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone ' get the form's list of records
rs.FindFirst "[Student ID] = '" & Me!txtStudentID & "'"
If rs.NoMatch Then ' see if this ID exists
MsgBox "Check this card, this ID was not found", vbOKOnly
Else
Me.Bookmark = rs.Bookmark ' open the found student's record
End If
This will, after you scan or type in the studentID, search the Form's
recordset for the selected student; if they're found their information
will be displayed, if not a message will pop up.
At one point when I put in the student ID it would just more all the
student information up one
I am a teacher and I would like to scan ID numbers from student ID's
to only allow students that belong in my lunch in and keep the ones
that don't belong in there out.
I pulled a list of students into Access I have a barcode scanner to
scan the student ID number into the computer which I have working. I
want to scan the students ID cards with a barcoded ID number and bring
up the students name, class, grade and lunch.
The Table contains #-Primary Key | Student ID | Last Name | First Name
| Grade | HR | Lunch | Class
I have a form as per John W. Vinson directions I have a form with text
boxes
Student ID Text box name txtStudentID control source Student ID
Lunch Text box name TxtLunch control source Lunch
First Name Text box name TxtFirstName control source First Name
Last Name Text box name TxtLastName control source Last Name
Grade Text box name TxtGrade control source Grade
Class Text box name TxtClass control source Class
And and Unbound text box ID Scan TxtIDScan
This is the code John gave me
In this textbox's AfterUpdate event put the following VBA code. Click
the ... icon by the After Update line on the Events tabl of the
textbox's properties:
Private Sub txtStudentID_AfterUpdate()
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone ' get the form's list of records
rs.FindFirst "[Student ID] = '" & Me!txtStudentID & "'"
If rs.NoMatch Then ' see if this ID exists
MsgBox "Check this card, this ID was not found", vbOKOnly
Else
Me.Bookmark = rs.Bookmark ' open the found student's record
End If
This will, after you scan or type in the studentID, search the Form's
recordset for the selected student; if they're found their information
will be displayed, if not a message will pop up.