Copying data in a query

Mitt1

Registered User.
Local time
Today, 06:31
Joined
Apr 20, 2016
Messages
19
I have the following query (see image)


All I wish to do is copy the customerCreditLevel to the customerLastMonthsCreditLevel. What criteria do I need to this. This is all I would like to do.
 

Attachments

  • Capture.PNG
    Capture.PNG
    4 KB · Views: 130
I don't understand what you want to accomplish. Do you want to update the customerLastMonthsCreditLevel field with what's in the customerCreditLevel field. If so for which records?

Please show us an example of the data before and after this copy would occur.
 
I don't understand what you want to accomplish. Do you want to update the customerLastMonthsCreditLevel field with what's in the customerCreditLevel field. If so for which records?

Please show us an example of the data before and after this copy would occur.

All I want is the data in the current credit level to be copied into the last months credit level. Eg. Current credit level : £10, after query run last months level £10 a simple copy and paste
 
This query (Edit: Updated per Gasman's observation)


Code:
UPDATE tblCustomer SET [tblCustomer]![customerLastMonthsCreditLevel] = tblCustomer.customerCreditLevel;


would do what I think you are saying but this doesn't make any sense to me as you will just end up with two fields that have that same value so I suggest you backup you database before trying this.
 
Last edited:
PMFJI Steve,

I think the code should be
Code:
UPDATE tblCustomer SET [tblCustomer]![customerLastMonthsCreditLevel] = tblCustomer.customerCreditLevel;

from what the o/p has stated?

This query
Code:
UPDATE tblCustomer SET tblCustomer.customerCreditLevel = [tblCustomer]![customerLastMonthsCreditLevel];

would do what I think you are saying but this doesn't make any sense to me as you will just end up with two fields that have that same value so I suggest you backup you database before trying this.
 
@ Gasman: Yeah I see now that I got it backwards. Thanks for catching that. But it doesn't make sense to me this way either.
 
I can only assume the current credit is/can be updated during the month and they want to keep track of what is was previously?
 

Users who are viewing this thread

Back
Top Bottom