On Friday 30 December 2005 11:53 am, Henry Lewers wrote: > Hello, my name is Henry. I am working on creating a database to use in the > student store at my high school. Currently, our school store is managed on > paper with a page for each student's account. The students deposit money at > the beginning of the year, which is then deducted by purchases until they > run out, in which case they have to deposit more money. Due to this > configuration, we require to keep a dated running balance for each student. > To follow ths configuration, we decided to give each student his or her own > table that would keep track of their purchases and balance. However, in > order to run this from a form, we would need to have inputs that would > change which table they were assigned to based on the name of student. For > example, we'd put in a student's name and their purchase, and it would save > to that student's table. However, we do not know how to configure the > tables and forms to make this work. Any suggestions would be greatly > appreciated. Thank you for your time > Sincerely, > Henry Lewers
Hey Henry, you're about to get a lesson in data normalization. First off, the way I'd go about this is to have one table, students, with the student's name and balance (setting up one table per student is really redundant and repetitive if you get my gist). You have another table, called transactions, that would have purchases. Third, you'd have either a trigger or a macro that would go in, look up the student, see if they have enough money, write out the row in purchases and update the balance. -- Dr. Joseph Dolan: Isn't there a children's book about an elephant named Babar? Fletch: I don't know. I don't have any. Dr. Joseph Dolan: No children? Fletch: No, elephant books. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
