jpmetcal
03-05-2000, 08:14 PM
I have created a database that stores student information, including name phone number student ID ect... I would like to be able to have a field in a form that you enter the students ID into and it then shows all of thier information. I created a search button using the wizzard but I don't want to use the Microsoft search window to look up the info. I'm new at this so be gentle http://www.access-programmers.co.uk/ubb/smile.gif
Thanks,
Josh
Carol
03-06-2000, 01:47 PM
Your selection field for the Student ID look-up should be an unbound combo box. Your form should be based upon the table or query that holds all the information. On your combo box for your Row Source Type, input table/query, then list the table or query name. On your "After Update" in your combo box properties, insert this Event Procedure Code:
Sub StudentID_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[StudentID] = '" & Me![StudentID] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
When you user selects a specific Student ID, all the matching information will be filled in the appropriate fields.
You will have to change the field names as required. I have assumed your Primary Key is called StudentID.
Good Luck