By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,882 Members | 2,482 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,882 IT Pros & Developers. It's quick & easy.

Easy q: Moving data in 1 field to data in another field (all records at once)

P: n/a
I'm sure this is easy so if you have a sec pls help me out thx.

Let say I have an inventory table and at the end of the month I want
to move the info in 1 field (total end of month 1) into another
field(total beg of month2) and then set the original field to 0. I
know simple copy and paste in the table view can do this but It's not
that efficient.

what I did:
I have created a query where total of end of month 1 is not null.
In the form's header I created a combo box that is supposed to do this
movement of fields.
I went to the onclick event procedure and tried to just assign 1 field
to another:

Private Sub Command15_Click()Me.field2=me.field1

But this doesn't work. Could it be because it's a query or can it not
change all of the records at once like this...
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 4 Jun 2004 07:13:58 -0700, ks*****@yahoo.com (Alienz) wrote:

This sounds like a TERRIBLE database design to me. It appears to
violate standard relational datatabase design rules. PLEASE rethink
this monthly copying.

Chances are I did not convince you. So here is the solution:
Create an Update Query like this:
Update Inventory Set MyField2 = MyField1
Then run it just like you would any action query. E.g. using the
Execute method of the Database object.

-Tom.
I'm sure this is easy so if you have a sec pls help me out thx.

Let say I have an inventory table and at the end of the month I want
to move the info in 1 field (total end of month 1) into another
field(total beg of month2) and then set the original field to 0. I
know simple copy and paste in the table view can do this but It's not
that efficient.

what I did:
I have created a query where total of end of month 1 is not null.
In the form's header I created a combo box that is supposed to do this
movement of fields.
I went to the onclick event procedure and tried to just assign 1 field
to another:

Private Sub Command15_Click()Me.field2=me.field1

But this doesn't work. Could it be because it's a query or can it not
change all of the records at once like this...


Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.