additionally, find here an email received from actinic support regarding this issue, since they came up with the solution about the same time I did.
And here is the actual code. i'v tested it, ona broken database, and works as well as my exe does.
One of our developers have written a module. Please find the module attached To install and run the module ReSequenceChoices:-
o Close Actinic backing up the DB
o Open the site ActinicCatalog.mdb with Access
o From the menu bar select Insert | Module
o Right click in the Project
o From the menu bar select File | Insert
o Browse to and select ReSequenceChoices.bas
o ReSequenceChoices should now be listed in the project window under o
ActinicCatalog.mdb (ActinicCatalog)
o Double click ReSequenceChoices, the code will be displayed.
o From the menu bar select Run | Sub/UserForm
o The fix will display the message 'n choices have been resequenced when
it's finished
o Exit Access
o Restart Actinic
o Update the web site and check the Components are correctly added to the
cart.
o Close Actinic backing up the DB
o Open the site ActinicCatalog.mdb with Access
o From the menu bar select Insert | Module
o Right click in the Project
o From the menu bar select File | Insert
o Browse to and select ReSequenceChoices.bas
o ReSequenceChoices should now be listed in the project window under o
ActinicCatalog.mdb (ActinicCatalog)
o Double click ReSequenceChoices, the code will be displayed.
o From the menu bar select Run | Sub/UserForm
o The fix will display the message 'n choices have been resequenced when
it's finished
o Exit Access
o Restart Actinic
o Update the web site and check the Components are correctly added to the
cart.
Code:
Option Compare Database Option Explicit Function ReSequenceChoices() Dim rsProdProp As Recordset Set rsProdProp = CurrentDb.OpenRecordset("SELECT nParentPropertyID, sStatus, nValue2 FROM ProductProperties WHERE nType = 7 ORDER BY nParentPropertyID, nValue2") Dim nParentPropertyID As Integer Dim nValue2New As Integer Dim nValue2 As Integer Dim nCount As Integer While Not rsProdProp.EOF If rsProdProp![sStatus] = "D" Then nValue2New = 0 Else If nParentPropertyID <> rsProdProp![nParentPropertyID] Then nParentPropertyID = rsProdProp![nParentPropertyID] nValue2 = 1 Else nValue2 = nValue2 + 1 End If nValue2New = nValue2 End If If nValue2New <> rsProdProp![nValue2] Then rsProdProp.Edit rsProdProp![nValue2] = nValue2New rsProdProp.Update nCount = nCount + 1 End If rsProdProp.MoveNext Wend rsProdProp.Close MsgBox (nCount & " choices have been resequenced") End Function
Comment