Link to home
Start Free TrialLog in
Avatar of Muhammad Ahsan
Muhammad Ahsan

asked on

inserting multiple rows in child table auto

i have two tables
1-  students (student_Name ,registration_no(primary key))
2-  fees (registration_no(foreign key) , fees , months , status )

question
         what i want to do is to auto add 10 years worth of months in fees_table automatically for every new student added in students_table
SOLUTION
Avatar of als315
als315
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Did you try adding trigger on student table?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Muhammad Ahsan
Muhammad Ahsan

ASKER

Als315 , thanks for help , but can u you be little more descriptive about solution it would really help

etsherman ,(1) yes i want  to do this each time a new student is added in the Students table from a From       Object     (2)  field : Month        data type : text          
                      default value / lookup  :  example ( 01-2000 ...02-2000..... 03-2001... 04-2002.......12-2010 )

Sharath , thanks , but a trigger has to be initiated every single time rather what i would like to do is add a automatic sequence which will trigger this trigger with ever new student entry. can u help me with that.

PatHartman , thanks for advice , if i am to follow your way then i would like to create a code that would add a new month in fees table automatically by the end of previous month and to not add a Month for  un-active student  but suppose a student have returned to institute after a year than a code have to resume adding from that returning month of student and skipping in middle months when student was un active ... so could u help me with code

note :  (1) in month field i only want month and year  (this field would be month for which fees is to be submitted)
 Example :                                                                             Feild               Month                              status                    
                                                                                             *record           03-2007                             paid
                                                                                                   *                 05-2008                             not paid    
 
                         (2) date of submitting fees would have different filed        

                              field : date_of_submission         data type : date/time         formate : general date     default value : now()

Request   :     i have specialty in Python , Mat-lab, lisp and C++ / C languages but not in Ms access so would  really appreciate  tolerate my question and try helping further
<<<<what i want to do is to auto add 10 years worth of months in fees_table automatically for every new student added in students_table>>>>

What are you using for the starting month for the 10 years (120 months) worth of months???  In other words, do you start the counter at the month the student was added???

ET
etsherman , yes , but what would you suggest
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thank u all for your help great experience  !!!!!!!!!!
very much thanks als315