>>>>Please see the minor adjustments I made and apply them. Are you sitting on the right record in crsBom?
>>
>>No problem, Sam. But do please find that message where I changed the code and adjust yours. It's not important, though.
>>
>>Put set step on before your code and run it in debugger.
>
>Sorry, I am confused now. I have looked at all the messages and I could not find where you made changes on the code. I have been stepping through it and the scan only points at the first partnum and ends there. The code does not even save the note for that partnum.
The changes I made are in
Re: Adding Notes in the same row Thread #
1214141 Message #
1215636 (I made them directly in your code).
Anyway, let's start again. Which cursor do you want to scan? Do you want to scan both cursors?
If yes, then
select crsBom
scan
lcNotes = ""
if seek(crsBom.PartNum, 'MyNotes','PartNum')
select MyNotes
scan while PartNum = crsBom.PartNum
if not empty(myNotes.Notes)
lcNotes = m.lcNotes + " " + alltrim(myNotes.Notes)
endif
endscan
if not empty(m.lcNotes)
replace Notes with Notes + m.lcNotes in crsBom
endif
endif
endscan
If it's not broken, fix it until it is.
My Blog