复制记录结构(相关记录) [英] Copy Record Structure (Related Records)

查看:44
本文介绍了复制记录结构(相关记录)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,这对我特别有用,所以非常感谢你。


我是使用Access 2003的新手,我对这个问题略有不满;我被要求让这个特定的按钮创建几个子记录,分享几个父母的基本特征。


虽然它很简单,只需要复制和根据用户请求的记录数量循环,我不熟悉从这里采取的步骤。


改变的字段是我的问题:


一个字段是标识符。对于孩子们,父母的标识符必须从例如123改为123.1,123.2等。我可以使用用户的输入和循环来获取数字,但我承认我真的不知道如何使用VB直接修改记录集中的数据。


对于看到更改的其余字段,我需要相信我需要为每个记录添加用户的输入对话框(也可能在循环中)。老实说,我不知道这里使用的代码是什么。


我在网站上看了很多文章,但很遗憾地说我找不到答案对于上述问题。如果已经解决了这个问题,请指出我的方向。我会非常感谢任何建议。谢谢!

解决方案

由于此网站上不允许线程劫持,我不得不将此帖子拆分为单独的帖子。作为新会员,这是可以理解的,但请查看右上角的 帮助 部分,了解网站Dos&不要。


原始帖子可以在使用命令按钮复制表单中的记录


虽然我已经为你链接了theads,但似乎还没有一个充分的解释你的问题。请尝试从头开始清楚地解释它。如果不理解这个问题,就很难提供任何帮助。


对不起我的不礼貌。我会更加小心。


至于我上面的乱码查询,我会尝试解决它一次出现一个问题:


我有一个基于两个表的查询。一个(主)保存大部分记录数据。另一个是组合框的来源,表示每个记录的状态。


表格设计如下:


StatusID - 自动编号(关键字段)

状态描述 - 文字


这两个表具有一对多的关系,主表位于一侧。该表中的StatusID字段与main中的外键字段连接。


问题出现在我根据此查询创建的表单中。有一个命令按钮可以编辑当前所选记录的状态。这会将外国ID字段中的数字从一个数字更改为另一个数字。




展开 | 选择 | Wrap | 行号

Hello, this was particularly helpful to me as well so thank you very much.

I''m new to using Access 2003, and I have a slight twist to this question; I''ve been asked to make this particular button create several child records that share several of the parent''s base traits.

While it''s simple enough to just duplicate and loop according to the number of records the user requests, I''m unfamiliar with the steps to take from here.

The fields that DO change are my problem:

One field is an identifier. The parent''s identifier would have to be changed from say, 123, to 123.1, 123.2 and so on for the children. I could use the user''s input and the loop to get the number, but I confess that I really don''t know how to directly modify data within the recordset using VB.

For the remaining fields that see changes, I need to I believe I need to add an input dialog for the user for each record (also in the loop presumably). I honestly have no idea what the code used here is.

I have read a number of articles on the site, but I''m sorry to say I haven''t found answers to the problems above yet. If this has already been addressed, please point me in the direction. I would be most grateful for any suggestions. Thank you!

解决方案

I''ve had to split this post into a separate thread as thread hijacking is not allowed on this site. As a new member it''s understandable but please review the Help section at the top right for site Dos & Don''ts.

The original thread can be found at using command button to copy record in a form.


Although I''ve linked the theads for you, there still doesn''t seem to be an adequate explanation of your problem. Please try to explain it clearly from scratch. Without understanding the question, it''s hard to give any help.


Sorry for my bad manners. I''ll be more careful.

As to my garbled query above, I''ll try to untangle it going one problem at a time:

I have a query is based on two tables. One (main) holds the bulk of the record data. The other is a source for a combo box, which denotes the status of each record.

The table design looks like this:

StatusID - Autonumber (key field)
Status Description - Text

The two tables have a one-to-many relationship, with the main table on the one side. The StatusID field in that table is joined with a foreign key field in the main.

The problem arises in a form I have created based on this query. There is a command button that edits the status of the record currently selected. This changes the number in the foreign ID field from one number to another.

i.e.

Expand|Select|Wrap|Line Numbers


这篇关于复制记录结构(相关记录)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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