Copy lines in a table/query using VBA

Snappy

New member
Local time
Today, 04:32
Joined
Sep 20, 2012
Messages
10
I am not sure if this is even possible. I do a bill of material in a form with part numbers for (4) types of material in one color. Each material has several different colors. I do not do a BOM for each color because the cost is the same no matter the color. I then run a VBA to export all the information to excel from a report. My report has formulas based on the data that is entered. Once in excel I have to add all the colors then upload in our system. What I would like to happen is run a VBA before I export this report and copy each line and add each color to it. I have a few primary keys. Then once it adds all the lines i need then export it to excel. Does anyone know if this is possible. Here is an example of the numbers

ML4712 A08 JBK-S
ML4712 A04 NAT-S

the part number stays the same but the other 2 fields need to change. there are several other fields but they will be exactly the same.

Thanks everyone
 
as a start can you post a sample of what you'd like the excel output to look like

David
 
i have attached a file of how it looks currently

what i was hoping to get it to do is add all the other colors that need to be upload. right now i just insert lines add the colors and it is very time consuming. everything is the same except the color code and the description has the 5 digit color on the end that corresponds to the color code that needs to change.

thanks for your help.
 

Attachments

what you've attached does not have any colour coding, are you intending to use the colour code column as a key to what the colouring should be? I can see a way of using the values in that column to set the clouring in that cell

David
 
the color codes are A08 S08

i need to copy the entire line but change the A08 to A01, A04 A07 and so on. there are 12 colors for the "A" and 10 colors for the "S". (they do not go in number order unfortunately)

also the JBK-S on the end of the description needs to change to PBL-S, NAT-S CHA-T and so on.

id like to do this before it exports to excel.

hope this makes sense.

sorry if i am not explaining it correctly.

thanks,
 

Users who are viewing this thread

Back
Top Bottom