救命!插入2 sbf时出现错误信息 [英] Help! Error Message when inserting 2 sbf's

查看:118
本文介绍了救命!插入2 sbf时出现错误信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿。我有一个基于tblClient的mainform。然后2 sbf?s基于查询。我试图将sbf插入到mainform中以允许数据输入(使用Tab Control)。我通过基于clientID的master和child字段将mainform和sbf连接在一起。我可以获得2个sbf中的1个来显示它的信息,但是当我尝试添加第二个1时,它会给我一个错误信息:


你试图锁定表?打开它时,但由于目前正在使用,因此表无法锁定。稍等片刻,然后再次尝试操作。?

我可以先输入1个sbf,然后输入1,然后第2个结束此消息并且没有显示任何东西。每个sbf都基于它自己的qry,它基于同一个表。


有什么建议吗?

Hey. I have a mainform, based off a tblClient. Then 2 sbf?s based off queries. I?m trying to insert the sbf?s into the mainform to allow for data entry (using the Tab Control). I am linking the mainform and sbf?s together through the master and child fields based off the clientID. I can get 1 of the 2 sbf?s to show it?s information, but when I try adding the second 1, it gives me an error message:

You tried to lock table ?while opening it, but the table cannot be locked because it is currently in use. Wait a moment, then try the operation again.?

I can insert either 1 of the sbf?s first and that 1 will work, then the 2nd 1 ends up with this message and doesn?t display anything. Each sbf is based off its own qry, which is based off the same table.

Any suggestions?

推荐答案

罗伯特,


你在用什么?第二个子表单。记录可能被第一个子表单锁定。如果您正在使用它来尝试分离问题我不认为这会起作用。


我不确定解决方案但是发布了更多有关组成的详细信息每个子表单以及为什么要分离记录和我能够帮助的其他一些专家的原因。

一旦你发布了更多信息,我会指出他们朝着这个方向发展详情。


Mary
Robert,

What are you using the second subform for. The records are probably locked by the first subform. If you are using it to try to separate out the questions I don''t think this will work.

I''m not sure of the solution but post more detail on the composition of each subform and why you are trying to separate the records and some of the other experts my be able to help.

I will point them in this direction once you''ve posted more details.

Mary


玛丽,对不起细节感到抱歉。你猜对了,我试图把sbf的问题分开来。有些sbf有很多问题,或者有几个问题没有直接关系,但我想在一个表单上显示。


例如,我有3个查询,总共返回10个问题/答案。每个查询与其他任何查询都无关,所以我没有使用2-3个填充的3个表单,而是以一种形式显示它们。


我在查询中没有全部的原因(例如:介于101和103之间或者?)是因为我不希望它们全部显示在数据表视图中。我想我只是挑剔,但我想我会将它们分解,然后为每个部分键入一个文本标签以区分它们。 (我想继续使用数据表视图,因为这是我的其他形式使用的。)


如果这是不可能的,那么我将尝试与他们一起生活在相同的清单。


谢谢,Robert
Mary, sorry for the lack of details. You guessed right, I am trying to separate the questions for the sbf?s. Some of the sbf?s have a lot of questions, or have a few questions that are not directly related, but I would like to display on a single form.

For example, I have 3 queries which return about 10 question/answers total. Each query is unrelated to anything else, so instead of having 3 forms with 2-3 fill-ins, I thought I?d display them all in 1 form.

The reason I did not have them all in a query (ex: Between 101 And 103 OR ?) was because I didn?t want them all displayed in the datasheet view together. I guess I?m just being picky, but I thought I would break them up and then type a text label for each section to distinguish them. (I would like to continue using the datasheet view, since that is what my other forms use).

If this is not possible, then I will try to live with them all in the same list.

Thanks, Robert


我只是为其他专家添加表结构。

< b> tblQuestions

问题编号(主键)

问题(文本字段)

tblAnswers

AnswerAutoID(主键)

ClientAutoID(FK)到tblClient

问题编号(FK)到tblQuestions

答案( Currancy)


Robert目前在主窗体上有一个基于tblAnswers的子窗体,基于tblClient,基于ClientAutoID的主/子关系。


他的问题是每个客户可能有数百个问题(预先填充)和答案,他希望将它们分成各种子表单,但当他试图添加第二个子表单时,他会给出n记录锁定错误。


Mary
I am just adding the table structures for the other experts.

tblQuestions
QuestionNumber (Primary Key)
Question (Text Field)

tblAnswers
AnswerAutoID (Primary Key)
ClientAutoID (FK) to tblClient
QuestionNumber (FK) to tblQuestions
Answer (Currancy)

Robert currently has a subform based on tblAnswers on a main form based on tblClient with a master/child relationship based on ClientAutoID.

His problem is that there are potentially hundreds of questions (prepopulated) and answers per client and he would like to separate them out into various subforms but when he tries to add a second subform he is given a record locking error.

Mary


这篇关于救命!插入2 sbf时出现错误信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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