从“field2”复制到新记录“field1” [英] Copy from "field2" to new record "field1"

查看:90
本文介绍了从“field2”复制到新记录“field1”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,让我开始说,当谈到VBA时,我是一个完整的新手,但是在我面临的问题中,我无法在Access 2010中解决它。请帮助。

在我的Table1中有两个字段打开和关闭,

关闭中的数据。字段必须自动复制到打开字段。新记录上的字段(全部在同一个表中)表格通过相同的ID密钥链接


Id |打开|关闭

1 | 100 | 150

1 | 150 | 275

1 | 275 |

我试图在访问复制记录时查看构建函数的代码,但知道运气。

请帮助.....

Hello Let me start of to says I''m a complete newbie when It comes to VBA, But in the problem facing me I can''t get around it in Access 2010.Please Help.

In my "Table1" there is two fields "Open" and "Close",
The data that is in the "Close" field must automaticly be copied to the "Open" field on a new Record(all in the same Table) The tables are linked via the same ID key

Id | Open | Close
1 | 100 | 150
1 | 150 | 275
1 | 275 |

I''ve tried to look at the code of the build in function in access to duplicate a record but know luck.
PLEASE HELP .....

推荐答案

您可以使用Max(Close)填充新的Open。​​
You can use the Max(Close) to populate the new Open.


感谢您的回复,我已经尝试在查询中使用它,但一直给我错误,我尝试使用的查询是更新查询。请记住,我的VBA非常弱,几乎没有任何现存。
Thank you for your reply, I''ve tryed to use it in a query but keeps on giving me errors,the query I tryed to use was a update query. please bear in mind my VBA is very weak and close to none exsisting.


首先。您是否想要在一次性过程中通过关闭字段将值插入到开放字段中,方法是单击按钮或者它将成为正在进行的事件,即每次在关闭字段中输入值时,您希望放置一个副本在开放的领域?


我认为最简单的方法是使用追加查询从关闭中获取值并添加/插入到打开的列中。
First of all. Do you, want to insert values into open field from close field in a one-go process by say clicking a button or is it going to be an ongoing event ie every time you enter a value in close field you want a copy to be placed in the open field?

I think the simplest way to do this is to use append query to get values from close and add/insert into open column.

展开 | 选择 | Wrap | 行号


这篇关于从“field2”复制到新记录“field1”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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