Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a strange behavior in a Macro that you need to do is update the fields in a table.
This is the macro:
sub OutLote
for k = 1 to ActiveDocument.Evaluate("=getSelectedCount(Order_Id)")
OutValue = ActiveDocument.Evaluate("=subfield(getFieldSelections(Order_Id, ';', 25), ';' ,"&k&")")
ActiveDocument.DynamicUpdateCommand("UPDATE SEL SET Lote=Null() WHERE Order_Id="&OutValue&"")
next
end sub
The strange behavior is that sometimes leaves the computer "hung" and do not know why it is. The same is silly but not see it.
Its aim is to update a table (SEL) with basic data are:
Order_Id, Lot and Date
In this case, you must make is to put the Lot = Null in the records selected through Order-Id.
In some cases, when multiple values are selected Order_Id eg 10 values (limit of 25), running, does it perfectly for 5 different, if we run without doing anything more, is doing well other 2 or 3 and so on down.
At the end is where you leave your computer "hanging"
Can you check it?
TX
Enrique
Any idea??
I can put msgbox, but I don't know activwe debug mode
New version ... QV
Now works ...!!