Hello
A have an application in MS Access 2000. It has a form (courses),
which has a subform (course occurrences), which has a subform
(occurrence learning aims).
The Learning aims subform is based on a table with a composite primary
key of course code ID, occurrence ID, learning aim code and year code.
The table also has got a column Deleted (Yes/No): learning aims
deleted by users are not deleted from the table, but marked
Deleted=Yes.
The subform has got a button New Learning Aim - to add more learning
aims to the occurrence. The button navigates the subform to a new
record and user enters learning aim code and year code.
When there is no primary key violation, it works OK, but sometimes
user wants to add a learning aim, which already exists in the table
marked as deleted. What I'd like to do in this situation is to mark
the learning aim Deleted=No and to switch to this record on the
subform.
I have managed to mark the learning aim Deleted=No, but the subform
still shows the new record. I tried to insert a command
me.Parent.Reque ry to requery the occurrence subform, which should have
included the newly undeleted learning aim and to show it on the
learning aim subform, but naturally I have got here error 3022. I
intercept it and don't show, but the subform is not requered and user
still looks at the new record, empty apart from learning aim code and
year code. Worse, when user leaves the subform, 3022 error message
shows in all beauty and doesn't allow to close the form normally.
After the form is closed and opened again, the learning aim is
restored from deleted and included on the subform, - the result, which
I'd like to get without seeing 3022 error message and forceful closing
and opening of the form.
Any advice would be greatly appreciated.
Thank you.
Galina
A have an application in MS Access 2000. It has a form (courses),
which has a subform (course occurrences), which has a subform
(occurrence learning aims).
The Learning aims subform is based on a table with a composite primary
key of course code ID, occurrence ID, learning aim code and year code.
The table also has got a column Deleted (Yes/No): learning aims
deleted by users are not deleted from the table, but marked
Deleted=Yes.
The subform has got a button New Learning Aim - to add more learning
aims to the occurrence. The button navigates the subform to a new
record and user enters learning aim code and year code.
When there is no primary key violation, it works OK, but sometimes
user wants to add a learning aim, which already exists in the table
marked as deleted. What I'd like to do in this situation is to mark
the learning aim Deleted=No and to switch to this record on the
subform.
I have managed to mark the learning aim Deleted=No, but the subform
still shows the new record. I tried to insert a command
me.Parent.Reque ry to requery the occurrence subform, which should have
included the newly undeleted learning aim and to show it on the
learning aim subform, but naturally I have got here error 3022. I
intercept it and don't show, but the subform is not requered and user
still looks at the new record, empty apart from learning aim code and
year code. Worse, when user leaves the subform, 3022 error message
shows in all beauty and doesn't allow to close the form normally.
After the form is closed and opened again, the learning aim is
restored from deleted and included on the subform, - the result, which
I'd like to get without seeing 3022 error message and forceful closing
and opening of the form.
Any advice would be greatly appreciated.
Thank you.
Galina
Comment