I want to create a copy / paste macro in acces 2016 to copy one one field to another field with in the same table
THanks.
I want to create a copy / paste macro in acces 2016 to copy one one field to another field with in the same table
THanks.
In a macro,
to copy db objects: COPYOBJECT.
if you mean copy data, build an APPEND QUERY.
inside the append query , is a select query to copy the source.
not enough info to provide an informed response. here are some links
https://bytes.com/topic/access/answe...te-macro-event
https://stackoverflow.com/questions/...-in-access-vba
I create a table with 2 fields.1 field contain Initials and the other field Last Names.I combined the info together on a form and want to copy it and past it back in to the same table ,but into another field
there is no need to store the data twice, just use a query to combine them when required e.g. something like
SELECT initials & " " & LastName as FullName
FROM myTable
the normal practice is to keep the fields separate as you have them at the moment - it makes it easier and quicker to find records when searching on last name
Ajax is quite correct. Combining fields and performing calculations should be done only in queries/reports/forms - not tables. (At least about 99.5% of the time when it comes to calculations).
Imagine the difficulty you will have when "A Smith" marries Mr. Brown and she changes her last name to Brown.
Last edited by Micron; 02-14-2018 at 09:26 PM. Reason: clarification
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Hi Ajax.Ajax is quite correct. Combining fields and performing calculations should be done only in queries/reports/forms - not tables. (At least about 99.5% of the time when it comes to calculations).
Imagine the difficulty you will have when "A Smith" marries Mr. Brown and she changes her last name to Brown.
i did combine the 2 fields as you mention.
The reason why I am doing this is because I index the combine field with no duplications.in the properties.
Tx
for this situation, you use a multi field index and set it to no duplicates allowed - see the index option on the ribbon when in table design view.I index the combine field with no duplications.in the properties.
Thank you for your assistance ,I cot it right to create a copy and paste macro.
Copy data from excel sheet and paste it in the rows of a spreadsheet subform via VBA is posible