U
unhinged
G'day,
I am experiencing a problem where the Access application hangs after an
update query that I am performing via code.
I have a form with two subforms; one subform lists the courses that
form part of the package students will take, the other subform lists
the courses available for that package based on the department offering
the package.
What I want to do is have buttons on each record in the subforms to
enable the user to click a button and add the available courses to the
package or remove a course from the package.
My code clears the packageID field in the underlying courses table for
the first subform by using the following SQL update query:
UPDATE tCourses SET packageID = NULL WHERE CourseID = Me!CourseID;
The second subform has this query:
UPDATE tCourses SET packageID = Forms!MainForm!Subform!packageID WHERE
CourseID = Me!CourseID;
The first time I ran the query to clear an existing course from the
package it worked fine. All subsequent attempts (three so far) to run
either query result in the hourglass cursor and the application hangs.
Both subforms are based on queries that limit the number of records
returned and allow me to display the name of the department and the
qualification that the course provides. Should I be updating these
queries rather than the underlying table?
Is there likely to be corruption in the database now that this has
occurred?
Is there a better way to achieve my stated goal?
Thanks in Advance,
Daniel.
I am experiencing a problem where the Access application hangs after an
update query that I am performing via code.
I have a form with two subforms; one subform lists the courses that
form part of the package students will take, the other subform lists
the courses available for that package based on the department offering
the package.
What I want to do is have buttons on each record in the subforms to
enable the user to click a button and add the available courses to the
package or remove a course from the package.
My code clears the packageID field in the underlying courses table for
the first subform by using the following SQL update query:
UPDATE tCourses SET packageID = NULL WHERE CourseID = Me!CourseID;
The second subform has this query:
UPDATE tCourses SET packageID = Forms!MainForm!Subform!packageID WHERE
CourseID = Me!CourseID;
The first time I ran the query to clear an existing course from the
package it worked fine. All subsequent attempts (three so far) to run
either query result in the hourglass cursor and the application hangs.
Both subforms are based on queries that limit the number of records
returned and allow me to display the name of the department and the
qualification that the course provides. Should I be updating these
queries rather than the underlying table?
Is there likely to be corruption in the database now that this has
occurred?
Is there a better way to achieve my stated goal?
Thanks in Advance,
Daniel.