两个图像子表单可以使用相同的模块吗? [英] Can two image subforms use the same module?

查看:70
本文介绍了两个图像子表单可以使用相同的模块吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定尝试将图片功能添加到另一个表单中。所以,我现在有两个图像子表单,一个用于儿童照片,一个用于成人照片。孩子们指的是儿童桌,成人到成人桌等等。


但是自从我尝试为成人表创建一个,我的数据库崩溃了。它似乎遭受了一些严重的腐败,我不得不花一些时间把它拼凑起来......我不知道这是不是巧合。


我的问题是我的两个图像子表单都可以使用相同的模块吗?我根本没有经验丰富的代码...我找到了点点滴滴并使用它,但我可能知道它真的很危险!再次感谢,

I decided to try to add the picture feature to another form. So, I have two image subforms now, one for the kids pics and one for the adult pics. The kids one refers to the kids table, the adult to the adult table, etc.

But ever since i tried to create the one for the adults form, my db crashes. it seems to have suffered some serious corruption, and I had to spend some time piecing it back together... i don''t know if it is a coincidence or not.

My question is can both of my image subforms use the same module? i am not at all experienced with code... i have found bits and pieces and used it, but i probably know enough to be really dangerous! Thanks again,

推荐答案

我建​​议这取决于您对术语子表单的使用情况。


可以使用表格作为子表格。相同的表单设计(具有单个关联模块)可以用作另一个表单中的两个单独的子表单。从这个意义上讲,它是可能的。


另一方面,如果你指的是两个单独定义的形式,你想作为第三个的子形式,那么在这个意义上它是不可能的(因为模块直接与表单设计相关联)。


如果后者是你想要的那么你仍然有一些范围来定义你的代码在标准模块中,其余形式以两种不同的形式,这两种形式调用标准模块代码来完成大部分工作。
I suggest that really depends on your usage of the term subform.

A form can be used as a subform. The same form design (with a single associated module) can be used as two separate subforms within another form. In that sense it is possible.

If, on the other hand, you are referring to two separately defined forms which you want to act as subforms for a third, then in that sense it is not possible (as the module is directly associated with a form design).

If the latter is what you''re after then you still have some scope to define much of your code in a standard module and the rest in the two separate forms such that the two forms call the standard module code to do most of their work.


哦 - 我想我明白了。如果我粘贴代码会有帮助吗?子表单,称为imageA。和imageC (a用于成人主窗体,c用于子主窗体)完全相同,除了a的记录源是成人表,c的记录源是子表。


我找到了一些我从互联网上使用的代码,它在表格的文本字段中查找文件路径并显示该图像。我将它与我昨天(这里)给出的代码相结合,以添加浏览功能。令我惊喜的是,我能够将这两件拼凑在一起。这是:

Oh- i think i understand. would it help if i pasted the code? the subforms, called "imageA" and "imageC" (a is used in the adult main form and c is used in the child main form) are exactly the same, except for that the record source for a is the adult table and the record source for c is the child table.

I had found some code that i used from the internet that looks up the file path in a text field of a table and displays that image. I combined it with the code i was given yesterday (here) to add the browse feature. I was pleasantly surprised that i was able to meld the two pieces together. Here it is:

展开 | 选择 | Wrap | 行号


不是真的:-S


我不确定你想说什么,所以我回答了对这个问题的两种可能的解释。让问题更清楚并不会有什么坏处,但是现在可能已经多余了,因为无论如何我已经回答了两种可能的解释。


我猜你还没有了解我的答案。我建议如果你想要帮助理解这一点,你应该解释一下你感到困惑的地方(如果你不知道它在哪里就很难清除混乱)。
Not really :-S

I wasn''t sure what you were trying to say so I answered both possible interpretations of the question. It wouldn''t hurt to make the question clearer, but that''s probably redundant now as I''ve answered both possible interpretations anyway.

I guess you haven''t understood something of my answer(s). I suggest if you want help understanding that, you should explain where you''re confused (It''s hard to clear up confusion if you don''t know where it is).


这篇关于两个图像子表单可以使用相同的模块吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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