Link to home
Start Free TrialLog in
Avatar of Wilder1626
Wilder1626Flag for Canada

asked on

VB6 - Transfer from MSHFlexgrid to another

Hi,
I need your help for what I would like to do bellow.

In my MSHFlexgrid1, I may have a huge volume of rows and columns. But in column 9, I have IDs.
What I need to do is to transfer in MSHFlexxrid3 all rows and columns. But every time a value will show in column 9 that match column 0 from MSHFlexgrid2, when it will transfer into MSHFlexgrid3, it needs to change the value from column 9 only with the SUB_ID in column 1 from MSHFlexgrid2. All the other details must stay the same. So far, this is not a problem.

Where it gets more complicated is if a single value from column 9 may show more than once in column 0 from MSHFlexgrid2. When that happens, it must be clone into a new row so that both SUB_ID are transfer in MSHFlexgrid3. If I have 3 match, then it should clone it 3 times with each SUB_IDs.

Example:
User generated image
The value 12 shows twice in MSHFlexgrid2 with 2 different SUB_IDs. So it needs to create a record of each like below:
User generated image
ow can i do that?

Thank you for your help.
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Please supply a sample project.
Avatar of Wilder1626

ASKER

Hi MartinLiss

Sorry. Forgot to put it the fist time.
Test-duplicate.zip
I'm at a play and I'll look at it later this evening.
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That's exactly what i needed. Thanks again for your help.
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.

Marty - MVP 2009 to 2015, Experts-Exchange Top Expert Visual Basic Classic 2012 to 2014