[AccessD] Record deleted by user

Gustav Brock gustav at cactus.dk
Sat Sep 6 04:40:22 CDT 2003


Hi John

You could create the records as needed - as you do now - but instead
of deleting them when finished, update Selected to False - this means,
of course, that a selected record must have an entry in your select
table and the field Selected in this must be True.

Then, from time to time, delete those records in the select table
where Selected is False. Or did you overwrite the FE every morning?
Or, as suggested by Jim, use a temp table which you recreate at every
launch.

/gustav


> I am trying to implement a "selected flag" system for a particular form.  I
> create a table local to the FE with two fields:

> SelectedID Long
> Selected Boolean

> I modify the form's query to do an outer join between the pk of the original
> table and SelectedID.
> I add a check box to the form bound to the Selected field.

> Whenever the user clicks the check box a record is created in the new table,
> the SelectedID is set to the PK of the original table and the Selected field
> is set true.  All fine so far.  Printing works fine - filter on records with
> a join to this table and selected = true.

> The odd behavior comes if I delete the records in the new Selected table.
> If I build a query that displays the original table joined to the Selected
> table, when I delete any records in the Selected table, the fields in the
> query from the Selected table display the words "Deleted" and I can no
> longer enter any data in that field because I get a JET error "record
> deleted by user".  I have to requery the query and then I can again create
> new records.

> This is an issue because the FORM's recordset works until I delete a record
> in the selected table, then the checkbox FOR THAT RECORD ceases to work for
> no apparent reason.  The reason of course is this problem discussed above.


> John W. Colby
> www.colbyconsulting.com



More information about the AccessD mailing list