English 中文(简体)
Problems with: Access 2007, VBA, Mother-Child Forms, Recordset 不可否认
原标题:Problems with: Access 2007, VBA, Parent-Child Forms, Recordset Not updatable

这很复杂。 我不太熟悉无障碍环境,我是一位方案家(说,我也许会给自己造成困难,而不是看到“麻风”答案)。

So let s consider (example): We have a library database thing. I have a specific copy of a book. My book can have several status: checked out, on shelf, destroyed, smells weird/sticky/out of commission.... I need/have two forms in Access. One for basic info on my book and one to actually update the status. With a status change there s a significant amount of data that needs to be recorded so this requires a seperate form. The book form itself just consists of basic information and a small sub form for rental history; the book form needs to include current status. My actual status table has a statusid, bookid, timestamp.

现在......既然我不了解准入,就会有问题。 我离开了我的书本和地位表格,并填写了美国律师协会的重新编号/顺序。 但是,当我试图把这两人连接起来时,我便敲响了。 我决定罚款,把问询转至实际前端出入证科(左边),并排出 v,适当约束我的形式。 BUT NOW。 它说,我的记录套是无法更新的。 我的假设是,我参加了一些发言并发表了一些声明,从而获得了该书的现状。 我只需要能够修改这些案文领域,我可以写上“我”的内容。 我发现了一些关于创建桌子的净话,但我也读到,在多用户环境中,工作不多。 当图书表开放时,用户点击一个顿,以改变我的图书状况,并节省/披露这一状况表,我确实需要重新编辑该书,以显示最新状况。

因此 我做了些什么?

最佳回答

If I understand you correctly your problem is that you have a complicated query in the mainform and want to open a second form to update one underlying table of that query, then want to change the current record in the newly opened form and save it and then requery the original form? I understand you are a programmer, so the most versatile way to do this seems to me: Button on the mainform that opens the new form in modal modus with the correct record (that ensures that the rest of the original forms code executes after the modal form is closed), do your magic in the modal form, then requery the mainform.

类似情况:

Private Sub myButton_Click()
  DoCmd.OpenForm "myEditForm", acNormal, , ID = 4, acFormEdit, acDialog
  me.requery
End Sub
问题回答

暂无回答




相关问题
Handling no results for docmd.applyfilter

I have an Access app where I use search functionality. I have a TextBox and a Search Button on the form, and it does a wildcard search of whatever the user enters in the TextBox, and displays the ...

Outlook 2007 CommandBarControl.Execute won t work

I recently switched to Outlook 2007 and noticed that my VBA-macros won t work. I use the following code to open a new appointment-item (and fill it automatically). It worked perfect in Outlook 2003, ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

MS Access: list macro from VBA

I have to deal with a few macros (not VBA) in an inherited Access application. In order to document them, I would like to print or list the actions in those macros, but I am very dissatisfied by ...

热门标签