Prev: Access 2003 Text Box
Next: Switchboard warning
From: Risse on 2 Apr 2010 02:53 "Issachar5" <Issachar5(a)discussions.microsoft.com> kirjoitti viestiss�:C2CA9BBC-A1B9-4871-9B1C-1731F3190C32(a)microsoft.com... >I would like to setup a code that would delete data from a table based on a > date range entered. Here is the scenerio, I have training database. Two > fields one for training hire date and the other trainer, I would like to > put > in a time that says 90 days from hire date the trainer's name is deleted > from > the trainer field. Is this possible. Please advise.
From: fabiola on 24 Apr 2010 03:01 "Issachar5" <Issachar5(a)discussions.microsoft.com> escribió en el mensaje de noticias:C2CA9BBC-A1B9-4871-9B1C-1731F3190C32(a)microsoft.com... > I would like to setup a code that would delete data from a table based on > a > date range entered. Here is the scenerio, I have training database. Two > fields one for training hire date and the other trainer, I would like to > put > in a time that says 90 days from hire date the trainer's name is deleted > from > the trainer field. Is this possible. Please advise.
From: Paul Shapiro on 4 Apr 2010 18:25 > "Issachar5" <Issachar5(a)discussions.microsoft.com> escribió en el mensaje > de noticias:C2CA9BBC-A1B9-4871-9B1C-1731F3190C32(a)microsoft.com... >> I would like to setup a code that would delete data from a table based on >> a >> date range entered. Here is the scenerio, I have training database. Two >> fields one for training hire date and the other trainer, I would like to >> put >> in a time that says 90 days from hire date the trainer's name is deleted >> from >> the trainer field. Is this possible. Please advise. You could write a query that sets the trainerName to Null for any training hire date more than 90 days ago, something like: Update MyTable Set trainerName=Null Where trainingHireDate<Date()-90 You could add code to run that query automatically either every time the db is opened, or every time a particular form is opened. But it would seem better to keep the data by modifying the table structure. For a training database, you might have tables like: Courses (courseCode, courseTitle, trainingHours, description, etc.): A training course which can be offered to students. Instructor (instructorID, lastName, firstName, dateHired, etc.): A person who can teach one or more courses. Classes (courseCode (FK), classDateStart, instructorID (FK), etc.): An offering of a training course. Student (studentID, lastName, firstName, etc.): A person who can take a class. Enrollment (courseCode (FK), classDateStart (FK), studentID (FK), grade, etc.): A Student taking a Class. By separating the course and the class, you can keep all the instructor records and keep all your training history.
From: Om on 6 Apr 2010 22:51
yah "fabiola" <fabiolita_aranguren(a)hotmail.com> wrote in message news:ebQygxC1KHA.260(a)TK2MSFTNGP05.phx.gbl... > > > "Issachar5" <Issachar5(a)discussions.microsoft.com> escribió en el mensaje > de noticias:C2CA9BBC-A1B9-4871-9B1C-1731F3190C32(a)microsoft.com... >> I would like to setup a code that would delete data from a table based on >> a >> date range entered. Here is the scenerio, I have training database. Two >> fields one for training hire date and the other trainer, I would like to >> put >> in a time that says 90 days from hire date the trainer's name is deleted >> from >> the trainer field. Is this possible. Please advise. > |