访问表格在检查表格中检查复选框时具有写冲突问题

发布于 2025-02-12 01:05:55 字数 1529 浏览 1 评论 0原文

我有一个访问表格,用户可以在其中为客户端添加新的电话号码。因此,该表单以以下方式工作:

  1. 有一个称为更新客户端详细信息的主要表单,其中包含一个称为 Update Phone Phone 的子形式,其中显示了客户端的电话号码列表。以下是表格中的字段:
[cID][FullName][PhoneType][PhoneNumber][Active]
1     Test ter   Mobile     0899955522    []<=(blank check box)
  1. 在表格上有一个更新按钮打开新表格,用户可以在其中添加新的电话号码。

  2. 当用户添加新电话号码时,电话号码将显示在更新电话子形式中默认为0(active是一个复选框字段)。

  3. 每当我单击复选框以使电话号码处于活动状态时,我都会收到写冲突错误。

请找到随附的图像:

“

我是当前在数据库上工作的用户。有人可以帮我解决这个问题吗?谢谢大家。

“

”返回更新客户端详细信息表格,其中新数字在更新电话子形式中显示“

“在任何试图检查复选框的地方都会给出写冲突错误的地方

I have an Access form where users can add new phone numbers for a client. So the form works in the following ways:

  1. There is a main form called Update Client Details which contains a subform called Update Phone which shows the list of phone numbers the Client has. Following are the fields in the form:
[cID][FullName][PhoneType][PhoneNumber][Active]
1     Test ter   Mobile     0899955522    []<=(blank check box)
  1. There is an Update button on the form that opens a new form where users can add a new phone number for the client.

  2. When the user adds a new phone number, the phone number is displayed in the Update Phone subform with Active being 0 by default (Active is a checkbox field).

  3. Whenever I click the checkbox to make the phone number active I receive the write conflict error.

Please find the attached image:

WriteConflict

I'm the only user currently working on the database. Can someone please help me solve the issue? Thank you all in advance.

UpdatePhoneSubform

AddNewPhoneNumber

Back to Update Client Details form where new number is shown in Update Phone subform

Wherever trying to check the checkbox it's giving the write conflict error

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沐歌 2025-02-19 01:05:55

当两个用户专门打开同一表时,写冲突就会发生,当您单击更新时,您的表格是record source for这两种表单。

解决方案:

1-使客户列表表单 记录源作为查询而不是表。

2-使客户关系的电话更新表单 to 无界表单带有联合国有限的控件

,并在单击保存并关闭时使用以下代码执行更新

CurrentDb.Execute "UPDATE [Your Table Name ] " & _
"SET [Client Phone Field] ='" & [Phone Number Text Box] & "' " & _
"WHERE [Client ID Field ] = '" & [Your Client ID Text Box] "'"

write conflict happen when two users open same table exclusively , when you click update your table is a record source for the two forms.

solution:

1- Make clients list Form Record Source as Query not Table.

2- make the client relation's phone update Form to Unbounded Form with un bounded controls

and use following code to perform update when you click Save and Close

CurrentDb.Execute "UPDATE [Your Table Name ] " & _
"SET [Client Phone Field] ='" & [Phone Number Text Box] & "' " & _
"WHERE [Client ID Field ] = '" & [Your Client ID Text Box] "'"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文