数据正在发生变化 [英] Data is changing that shouldnt

查看:74
本文介绍了数据正在发生变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常令人困惑的问题,我希望有人可以帮我解决。这有点难以解释,但我会尽我所能。我也提供了一个文件链接,所以你可以仔细看看。


我所拥有的是一个用于输入工作时间细节的表格,任务的速度和执行任务的人员。该表单允许用户选择他们想要提供详细信息的项目,其中包含实际输入/编辑详细信息的子表单。表单上有一个按钮,允许用户打印详细信息摘要。


到目前为止,一切似乎都运行良好。但是前几天,维持这个过程的人删除了一个记录。他删除的记录被删除没有任何问题,但不知何故,当项目08.0136.01删除记录时,项目08.0126.01的记录以某种方式将项目编号更改为项目08.0136.01。


当删除08.0126.01中的记录时,似乎不会发生这种情况,因为表后面没有记录(尽管我确定表是否重新排序)将这些记录放在第一位,但会发生同样的事情。


我认为它可能与引用查询而不是表的子表单有关,所以我将源更改为表,同样的事情发生了。


对于我的生活,我无法弄清楚如何发生这种情况或如何解决它。如果有人可以提供帮助,我将非常感激。这里是文件的链接 http://www.stellarwebcreations.com/C ... ataProblem.zip


有问题的表格是frm_EditConstructionLog。如果您从下拉列表中选择项目08.0136.01并删除其中一条记录,您将看到我正在尝试解释的内容。查看问题的最简单方法是运行打印构造日志。如果只删除了一条记录,你会看到总数没有达到应有的水平,而且数字改变的记录将显示在项目08.0136.01中。


BTW我正在使用Access 2002创建数据库,但它以2000格式保存。


非常感谢!

I am having a very perplexing problem that I''m hoping someone can help me solve. It''s a little difficult to explain, but I''ll do my best. I''m also providing a link to the file so you can take a closer look.

What I have is a form that is used to enter details of time spent on a job, the rate of the task and who performed the task. The form allows the user to choose the project they want to provide details for with a subform where the details are actually entered/edited. There is a button on the form that allows the user to print a summary of the details.

Up until now, everything seemed to be working fine. But the other day, the person maintaining this process deleted a record. The record he deleted was deleted with no problem, but somehow, when the record was deleted for Project 08.0136.01, a record for Project 08.0126.01 somehow had the project number changed to Project 08.0136.01.

It doesnt seem to happen when a record from 08.0126.01 is deleted because there are no records in the table after it (though I''m sure if the table was re-sorted to put those records first, but same thing would happen).

I thought it might have to do with the subform referencing a query instead of the table, so I changed the source to the table, and the same thing happened.

For the life of me, I cannot figure out how that could happen or how to fix it. If anyone can help, I''d be most grateful. Here''s the link to the file http://www.stellarwebcreations.com/C...ataProblem.zip.

The form in question is frm_EditConstructionLog. If you choose project 08.0136.01 from the dropdown and delete one of the records, you''ll see what I''m tryin to explain. The simplest way to see the problem is to run the "Print Construction Log" You''ll see the totals do not add up to what they should if just the one record was deleted, and the record that had the number changed will appear in Project 08.0136.01.

BTW I''m using Access 2002 to create the database but it is saved in 2000 format.

Thanks so much!

推荐答案

组合框后面没有代码,所以你不能选择136,你如何删除没有选项或按钮的记录。看起来您使用链接子和主字段属性。我从来不喜欢使用它们,并且总是建议您将限制移到查询中。我可以看到这是你的数据库的一个简化版本,因为frm_menu不存在。所以也许其他东西也不见了。为了给你任何帮助,我不需要你如何删除记录。请发布代码。
Well there is no code behind to combo box so you can''t select 136 and how are you deleting records you have not option or button. It looks like your using the link child and master fields property. I''ve never liked using them and always recommend you move that restriction over to the queries. I can see that this is a chopped down version of your DB since frm_menu is not there. so maybe so other things are missing as well. in order to give you any help at all I would need to no how you are going about deleting the record. please post code.



那么组合框后面没有代码所以你不能选择136
Well there is no code behind to combo box so you can''t select 136



不确定你的意思。我只是打开文件(是的,它被删除)并且子窗体正上方有一个组合框(label =选择项目编号)如果你进入该框的属性,你会看到它从哪里拉数据。

Not sure what you mean. I just opened the file (yes, it is cut down) and there is a combo box right above the subform (label = Choose Project Number) If you go into the properties of that box, you will see where it is pulling the data from.


为了给你任何帮助,我不需要你如何删除记录。请发布代码。
in order to give you any help at all I would need to no how you are going about deleting the record. please post code.



直接从子表单中删除记录(只需单击记录选择器并删除记录)


谢谢!

The records are being deleted directly from the sub form (just clicking on the record selector and deleting the record)

Thanks!


Wups我的错我遇到了问题因为我处于只读模式我不得不使用IE因为FF不会让我下载你的文件但是我没有看到相同的像你一样问题,但当我连续删除多条记录时,我经历了所谓的踩踏记录,这是因为你在删除后没有强制保存。我认为这个问题只是因为你基本上允许用户直接编辑表格,但他们希望表格没有被锁定。对不起,我个人真的不能帮助我用不同的表格让用户编辑删除和添加记录而不是使用数据表。
Wups my fault I was having issue because I was in read only mode I had to use IE because FF would not let me download your file however I''m not seeing the same issue as you, however when I deleted multiple records in a row I experienced what is called stepping on a record, this is because your not forcing a save after delete. I think the issue is just because your basically allowing the user to edit the table directly however they want the form is not locked down. I sorry I can''t really help personally I wold have a different form for the user to edit delete and add records instead of using the data sheet.


这篇关于数据正在发生变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆