January 15, 201313 yr I need to have a start up script. I am trying to find a student with a code on then go to that person's record in one of three tables. The database is called BHS_Registration. I have a special unique code for each student with the field name: Reg_Code I want the database to find the student based on the code and then go to the correct table based on the students grade level. Here is the script I have so far. It goes to the Students table, it finds the correct student, but it stops there. It will not go on to the correct grade level table based on the students GRDE field.. Go to Layout ["StudentFind" (Students)] Show all records Enter Find Mode [Pause] Set Field [students::Reg_Code] Perform Find [] If [students::GRDE=11] Go to layout ["Grade 12 Registration for" (Registration Form)] If [students::GRDE=10] Go to layout ["Grade 11 Registration for" (Registration Form)] If [students::GRDE=09] Go to layout ["Grade 10 Registration for" (Registration Form)] End if Please help if you can. Thanks Lester
January 15, 201313 yr Author I found out I needed to put "" marks around the grades in the calculation: If [students::GRDE="10"] Go to layout ["Grade 11 Registration for" (Registration Form)] Now it takes me to the correct form (table), but it does not bring in the student's records. I have a relationship set up with the Students Table and the Three Grade level Registrations Tables, but it is not find the students for me.
January 15, 201313 yr Your Find command is finding the current Student, but when you switch to the 'Reg Form' layout, you are not finding that student's Reg Forms. So you can either add another Find command after the three 'Go to Layout' commands or use the 'Go to Related Record' command which can both switch to the desired layout and find a set of related records all in one step (depending upon what options you choose). If you use 'Go to Related Record', you will want the 'Show only related records' checkbox selected with the 'Match current record only' option. To put that in your table syntax, FM will 'Show only related [Registration Form] records' that 'Match the current [students] record only'.
Create an account or sign in to comment