Setting View Criteria with a Custom Action and a problem with Pop-Up Forms

Setting View Criteria with a Custom Action and a problem with Pop-Up Forms

I have 4 forms in my application.  One which keeps track of students, one which tracks the offices where the students work, one which keeps track of classes which are offered, and one which is for entering a new registration (this one has lookup fields to each of the other forms).  I am running across 2 distinct problems.

Problem 1.  I want to be able to add a New Student, New Office or New Class record from within the New Registration form.  I tried creating a decision box which, when checked, opened up a pop-up window displaying the appropriate form.  This worked well but had one large drawback.  In order for the New Student, Office or Class to be available, the New Registration form had to be refreshed - losing any information which was already entered.  The second solution that I came up with is to recreate the New Student, New Office and New Class forms withing the New Registration form, writing an "Add Record" script to run "On Success".  This system works, but is very time consuming...and my resulting New Registration form is rather cumbersome!!


Problem 2.  I want to be able to go to create a Custom Function on my "Class List" view that allows me to use a Custom Action to view a list of students attending a particular class.  In searching the User Guides I found an article about a "Meeting Tracker" app.  Studying the script from it's "View Attendees" function I came up with the following Function script:

OpenURL ("#View:View_Attendance?ID_Class = input.ID &zc_Header=false&zc_Footer=false&zc_DelRec=false")

View_Attendence is a view I created which connects to my New Registration database.
ID_Class is a field in the New Registration form which autopopulates from the ID field for a given class.

My hope was that this script would open up View_Attendance using the criteria of ID_Class being equal to the input.ID of the class.  This wasn't exactly what happened.  Although View_Attendance did open properly, all the records were shown regardless of which class - if any - they were linked to. What am I missing?


Any help would be greatly appreciated!!!  I have been troubleshooting my application for the past few days, practically non-stop, and haven't been able to resolve these two issues.