Records getting deleted, Need Help!!! (1 Viewer)

kasmax

Registered User.
Local time
Today, 22:32
Joined
Jun 4, 2012
Messages
38
The first question is "Why does it even matter if there are gaps in the sequence of values in that field?" That's how the auto incrementing process works; sometimes values are generated but not saved, so they are lost.

Gaps in the sequence may or may not imply someone is assisting you by randomly deleting records. Or it may simply be a byproduct of how those values are generated.
Its because some records are getting deleted randomly and i dont know how are they getting deleted.
so when i look at it i can see missing ids thats where records are deleted
 

kasmax

Registered User.
Local time
Today, 22:32
Joined
Jun 4, 2012
Messages
38
I wonder what makes the OP believe records have been deleted? So, I'll ask:
@kasmax :
What makes you beleive that records have been deleted? You stated "Records are saved as they are visible for a while before disappearing". Well, this makes no logical sense. It sounds like the records were never really saved to begin with. The user may have gone to a new record but never completed making it. In other words, no form text boxes were ever filled or checkboxs checked or whatever. That would cause gaps in sequence to occur. "Visible for a while..."? I don't beleive it. Not without some person deliberately doing it.
Ok let me explain.
its a readonly continuous form that refreshes every few minutes and fetch data from another server into its own sql server backend table.
so we see that after refresh some records appear in this form. but after sometime with another refresh some records are gone.
we make note of time it fetched record and then when records are gone we look at that time (timestamp field in table) and we see its missing as well as the gap there in id sequence
 

spaLOGICng

Member
Local time
Today, 07:32
Joined
Jul 27, 2012
Messages
127
There is no button on user form to delete records
Hmm... CTL+A then CTL+- ... this catastrophic as it will delete all records.

Also, selecting individual records from the record selectors on the left then clicking right mouse will also permit record deletion.

No programming required to delete records.
 

GPGeorge

Grover Park George
Local time
Today, 07:32
Joined
Nov 25, 2004
Messages
1,873
Its because some records are getting deleted randomly and i dont know how are they getting deleted.
so when i look at it i can see missing ids thats where records are deleted
Let's not confuse the difference between gaps in the sequence of AutoNumbers, which is a completely normal byproduct of how they are generated (and occasionally discarded without being used), and the actual subsequent deletion of records that were previously saved and visible.

The fact that you see gaps doesn't prove records were deleted, in other words.

If you can demonstrate by other means that records have been deleted, the gap in the sequence might be a useful way to isolate the relative time when they were entered (assuming you have date/time fields in records you can use to triangulate on when the record should have been entered).

Once again, please confirm that the records were physically present in a table, not just displayed in a form, prior to being deleted. I am very suspicious, in fact, that the records seem to be displayed in a continuous view form from which they disappear, and I would really be grateful for confirmation that you can, in fact, see the table with those records in it at some point.

If so, you can put a time frame around the disappearance of the records. It may well be that, if there is some delay involved, processes other than what you see only in that form have been invoked elsewhere.
 

kasmax

Registered User.
Local time
Today, 22:32
Joined
Jun 4, 2012
Messages
38
Let's not confuse the difference between gaps in the sequence of AutoNumbers, which is a completely normal byproduct of how they are generated (and occasionally discarded without being used), and the actual subsequent deletion of records that were previously saved and visible.

The fact that you see gaps doesn't prove records were deleted, in other words.

If you can demonstrate by other means that records have been deleted, the gap in the sequence might be a useful way to isolate the relative time when they were entered (assuming you have date/time fields in records you can use to triangulate on when the record should have been entered).

Once again, please confirm that the records were physically present in a table, not just displayed in a form, prior to being deleted. I am very suspicious, in fact, that the records seem to be displayed in a continuous view form from which they disappear, and I would really be grateful for confirmation that you can, in fact, see the table with those records in it at some point.

If so, you can put a time frame around the disappearance of the records. It may well be that, if there is some delay involved, processes other than what you see only in that form have been invoked elsewhere.
It certainly has records in the table at one point.
attached is the screenshot of the form, after refreshing when it shows new records and time in, we just select from the dropdown circled in green an option and it then prints a ticket with time in etc.
but when we dont see a records that we already have printed a label then we look at what time is it on the printed label and look at backend.
there would be no record with that time in (first field on left).
for example if the missing record had time 8:45 the record before missing one has time 8:44, then we see that for record after 8:44 which for example could be 8:46. so the record 8:44 would have id 80 and the next record 8:46 would have id 82.

here we see that the record is missing for 8:45 and also the gap in the ids.
and the fact that we are able to print the label which the data comes from table means that missing record was in the table.
 

Attachments

  • sample.png
    sample.png
    10.3 KB · Views: 28

GPGeorge

Grover Park George
Local time
Today, 07:32
Joined
Nov 25, 2004
Messages
1,873
It certainly has records in the table at one point.
attached is the screenshot of the form, after refreshing when it shows new records and time in, we just select from the dropdown circled in green an option and it then prints a ticket with time in etc.
but when we dont see a records that we already have printed a label then we look at what time is it on the printed label and look at backend.
there would be no record with that time in (first field on left).
for example if the missing record had time 8:45 the record before missing one has time 8:44, then we see that for record after 8:44 which for example could be 8:46. so the record 8:44 would have id 80 and the next record 8:46 would have id 82.

here we see that the record is missing for 8:45 and also the gap in the ids.
and the fact that we are able to print the label which the data comes from table means that missing record was in the table.
Thank you. I apologize for being a bit over-assertive, but this was always about confirming details, not questioning the process. As I see it, Trouble-shooting usually involves making sure that every possible factor is considered, not assumed. You do not, apparently review the tables for completeness until and unless a record appears to go missing, though?

There is a lapse of time between when the labels are printed the first time and later events where you look at the form and notice missing records. That opens up a lot of possible scenarios where other events -- intentional or accidental, or even malicious -- could occur, does it not? And that raises the question as to what controls are in place to prevent deletions. I don't know that we were aware the subject matter appears to be medications. And my suspicious mind immediately goes to the question, "Why would someone want to delete a record of a drug having been dispensed?" Knowing that there could be a gap of some time between when the record was created and a label printed and when you notice the deletion, what opportunity would there be for someone to "inadvertently" cause a record or records to go away. And would there be any reason to be concerned about that even being a possibility?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 10:32
Joined
Feb 19, 2002
Messages
43,275
You have circled an empty combobox. Al the comboboxes in this tightly clipped image are blank. I see no sequence numbers either. So, the image doesn't show anything that I can make sense of. You say that rows are missing and your "evidence" is gaps in the autonumber on a particular form. Have you actually opened the table and searched for the missing autonumbers?

There are other explanations for sequence number gaps than someone deleting records and we are trying to get you to examine them.

One that hasn't been mentioned so far is that the recordset is not specifically sorted on the autonumber ID. Add an order by to the form's RecordSource query if it doesn't have one.
 

LarryE

Active member
Local time
Today, 07:32
Joined
Aug 18, 2021
Messages
591
There is no relational integrity defined.
There is an Auto increment field for AutoID in the table.
I wonder if Primary Key records are being produced but their related Foreign Key records are not, so you have orphaned records that could be in tables but not showing in forms. Without seeing your design, I am just guessing. Since you don't enforce referencial integrity, anything could happen.
 

Users who are viewing this thread

Top Bottom