Q: DataBase Question I am an A-Level student in Sheffield, England and have taken on a project slightly above my league. The project involves creating a search tool to find a pupil in the school at anyone time. Therefore this must have some kind of input device which looks on the database (Access or preferably excel) and the relates it to some kind of timetable maybe in the form of an array that holds the information of the pupils whereabouts. I was wondering if you could help me in going about starting this, point me in the right direction and possible give me some code that I could work with. I would be more than grateful, thanks again, Mike.
well, I suppose you have some kind of database with the school schedule in it (classes, where the les will be, the hours and that kind of things). You have certainly a table in which class the pupil is set. All you have to do is make a littel query with some user input: Select ClassLocation From School Inner Join Pupils Where Pupils.PupilId = 1 And School.TimeStart > = #13:00# And School.TimeStop < #14:00# This will give you the class where the pupil with id 1 wil be between one en two o'clock. Of course you must set you table up: Table School: Fields: ClassId, ClassLocation, TimeStart, TimeStop Table Pupils: Fields: PupilId, PupilName, PupilClass The link between two tables is - of course - the School.ClassId with Pupils.PupilClass You have to make a form where your users can choose the pupil (by (part of the) name or id) and to set a time to search from. That's all basic VB; nothing difficult about it. I suggest you take a look at the section about access; there you find examples about making table and query at runtime. Return