Doesn't make a lot of sense to me to store the same value in two fields in
the same record, but you can do it through code or a query. This code will
set "MOL" to the value of "Employee" in every record:
Dim db as DAO.Database
Dim rs as DAO.Recordset
Set db = CurrentDB
Set rs = db.OpenRecordset("Customers")
If Not(rs.EOF and rs.BOF) Then 'rs is not empty
rs.MoveFirst
Do Until rs.EOF = True
rs.Edit
rs("MOL") = rs("Employee")
rs.Update
rs.MoveNext
Loop
End If
rs.Close
Set rs = Nothing
Set db = Nothing
Or you can use a Query... here's the SQL... you can execute it manually, or
from code with the .Execute method:
UPDATE Customers SET Customers.MOL = [Customers].[Employee];
If you want to do this only for specific records, obviously then you'll have
to select just the records you want to update, but you didn't mention that.
Larry Linson
Microsoft Access MVP
"Svelte Poshy" <sv******@yahoo.com> wrote in message
news:3f*********************@news.frii.net...
Copy the content of a field into another field
In my table Customers i want to copy the content of the field
"Employee"
which is a text field, into the field MOL, also a text field
I need to copy the field through code, with DoCmd.statement
Can somebody help me ?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!