[AccessD] Record deleted by user

John Colby jcolby at colbyconsulting.com
Fri Sep 5 21:14:36 CDT 2003


> I would create the table in a temp MDB file unless the FE will be replaced
on a regular basis.

The FE is downloaded every morning when they click a hotlink to a batch file
on their desktop.

>  I would try prefilling the select table with one record for each of the
main records and doing an inner join.

I tried that.  There are problems starting with when to build the records?
There are thousands of these records so I really only wanted to generate
records for the specific records they wanted to print, which is why I am
doing it this way to start with.

>The only time then you'd delete a selected record is if the main record
gets deleted.

Yea, I really ran into this because I was going into the table and manually
deleting the select records.  It PROBABLY won't be something that ever crops
up but it's a nasty one if it does.

John W. Colby
www.colbyconsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Jim Dettman
Sent: Friday, September 05, 2003 7:26 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Record deleted by user


John,

 Couple of comments.

<< I create a table local to the FE with two fields:>>

 I would create the table in a temp MDB file unless the FE will be replaced
on a regular basis.

<<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.>>

  Access displays #Deleted when it can't figure out which matching record it
can use.  I believe you'll find that it's because your using the outer join.
The same problem occurs with ODBC linked tables at times.

  I would try prefilling the select table with one record for each of the
main records and doing an inner join.  The only time then you'd delete a
selected record is if the main record gets deleted.

  As for inserts into the selected table, you might want to handle those
manually via code and keep the selected table's PK out of the underlying
query.


Jim Dettman
President,
Online Computer Services of WNY, Inc.
(315) 699-3443
jimdettman at earthlink.net

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John Colby
Sent: Friday, September 05, 2003 2:07 PM
To: AccessD
Subject: [AccessD] Record deleted by user


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


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list