R
robert d via AccessMonster.com
I have a subform. The RecordSource of the subform is set in code. Here's
the line of code:
Me.Subform1.Form.RecordSource = "SELECT Distinct ProjectID, Status FROM
[TEMP_PROJECT_TABLE]"
So maybe the table has twenty rows with about 10 fields per row, but if there
are only two distinct ProjectID, Status, then only these two are displayed.
The subform has two textboxes and is set to display in continuous mode.
I have included the record selectors on the subform. I would like the user
to be able to select a line and delete it if desired.
However, this doesn't work. I guess because Access doesn't know which row to
delete. The table has 20 rows, but only two are displayed on the form
because of the "Distinct" in the SQL statement.
Okay, that's fine.
But, I would like to intercept the delete action that the user has taken.
He/she has clicked on the record selector and then pressed the "Delete" key
on the keyboard. If I can intercept it, I can run my own code to delete all
of the rows in the table that have the selected ProjectID and status.
Can I do this?
the line of code:
Me.Subform1.Form.RecordSource = "SELECT Distinct ProjectID, Status FROM
[TEMP_PROJECT_TABLE]"
So maybe the table has twenty rows with about 10 fields per row, but if there
are only two distinct ProjectID, Status, then only these two are displayed.
The subform has two textboxes and is set to display in continuous mode.
I have included the record selectors on the subform. I would like the user
to be able to select a line and delete it if desired.
However, this doesn't work. I guess because Access doesn't know which row to
delete. The table has 20 rows, but only two are displayed on the form
because of the "Distinct" in the SQL statement.
Okay, that's fine.
But, I would like to intercept the delete action that the user has taken.
He/she has clicked on the record selector and then pressed the "Delete" key
on the keyboard. If I can intercept it, I can run my own code to delete all
of the rows in the table that have the selected ProjectID and status.
Can I do this?