473,387 Members | 1,624 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
1 1506
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Redd | last post by:
The following is a technical report on a data modeling project that was recently assigned to me by my professor. I post it so that anyone else who is studying databases and data modeling can have...
4
by: Edward | last post by:
Access 2k -> SQL Server 2k My client has an app that is A2k FE with A2k BE. They have asked me to move the BE to SQL Server. I have a bit of experience with SQL Server, and I'm happy with...
4
by: Krzysztof Bartosiewicz | last post by:
Hi! I haven't been using Access for a very long time and I forgot everything :) I will be very greatful for help since I have been fighting with this problem for a few hours... I have three...
15
by: Deano | last post by:
I've posted about this subject before but haven't really got anywhere yet. I have now come up with a plan of action that takes into account my strong desire to implement save/discard functionality...
11
by: hoopsho | last post by:
Hi Everyone, I am trying to write a program that does a few things very fast and with efficient use of memory... a) I need to parse a space-delimited file that is really large, upwards fo a...
20
by: hippomedon | last post by:
Hello everyone, I'm looking for some advice on whether I should break the normalization rule. Normally, I would not consider it, but this seems to be a special case. I have created an...
3
prn
by: prn | last post by:
Hi folks, I've got something that's driving me crazy here. If you don't want to read a long explanation, this is not the post for you. My problematic Access app is a DB for keeping track of...
9
ADezii
by: ADezii | last post by:
One question which pops up frequently here at TheScripts is: 'How do I retrieve data from a Recordset once I've created it?' One very efficient, and not that often used approach, is the GetRows()...
3
by: c0l0nelFlagg | last post by:
I have a moving dispatcher database. There are 99 drivers, 99 loaders, and 50 different vehicles. The scheduler database is built on a 13 4 week month year so that it can be used repeatedly in any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.