Home

Macros and Programming

 

CardboxForumsMacros and Programming > "problème....erreur"

problème....erreur

problème....erreur (je ne vois pas ou ????)

Current user: [none]
Register / Log In · Help

Posted By Post

CDP-Nivelles

19-Jun-2006 12:17

'Index mots-clés
Activate "TFE MOTS-CLES"
Database.ClearTagged
SelectionLevel=0
Format=""
FirstRecord
SetSequence "*+MC"
Activate "TFE CATALOGUE"
Database.ClearTagged
SelectionLevel=0
Format=""
FirstRecord
Activate "TFE MOTS-CLES"
For irec=1 to RecordCount
var_MC=fields("MC")
Activate "TFE CATALOGUE"
ActiveWindow.Select "MC",var_MC =>>> erreur ici ????

For i=1 to RecordCount
var_in=fields("IN")
Activate "TFE MOTS-CLES"
editRecord
GoToField "IN"
Command cmdEnd+cmdControl
TypeText ", "&var_IN
SaveRecord
Activate "TFE CATALOGUE"
NextRecord
Next
SelectionLevel=0
Activate "TFE MOTS-CLES"
'Effacement de la virgule au début de la phrase
EditRecord
GotoField("in")
Command cmdHome
Command cmdDelete
SaveRecord
NextRecord
Next

'Impression des mots clés

Format="TABLE INDEX"
FirstRecord
Print cbxPrintMainRecord

Charles Welling

19-Jun-2006 13:37

Essayez cette macro modifiée. Si ça ne marche pas, précisez s.v.p. ce que la macro fait ou ne fait pas, des messages etc.

Try this modified macro. If it doesn't work, please describe what the macro does or doesn't do, report any messages etc.

Charles

'Index mots-clés
Activate "TFE MOTS-CLES"
Database.ClearTagged
SelectionLevel=0
Format=""
FirstRecord
SetSequence "*+MC"
Activate "TFE CATALOGUE"
Database.ClearTagged
SelectionLevel=0
Format=""
FirstRecord
Activate "TFE MOTS-CLES"
Record_Cles=recordcount

For irec=1 to Record_Cles
var_MC=fields("MC")
Activate "TFE CATALOGUE"
ActiveWindow.Select "MC",var_MC
Record_Catalogue=recordcount

For i=1 to Record_Catalogue
var_in=fields("IN")
Activate "TFE MOTS-CLES"
editRecord
GoToField "IN"
Command cmdEnd+cmdControl
TypeText ", "&var_IN
SaveRecord
Activate "TFE CATALOGUE"
NextRecord
Next

SelectionLevel=0
Activate "TFE MOTS-CLES"
'Effacement de la virgule au début de la phrase
EditRecord
GotoField("in")
Command cmdHome
Command cmdDelete
SaveRecord
NextRecord
Next

'Impression des mots clés
Format="TABLE INDEX"
FirstRecord
Print cbxPrintMainRecord

CDP-Nivelles

19-Jun-2006 14:57

Merci mais j'ai toujours la meme erreur, message qu'il me donne
"Runing macro: gestion des index
command failled
Parametres incorrect(80070057)
position in line 19 character 1"

merci pour l'aide et votre français si impeccable.

'Index mots-clés
Activate "TFE MOTS-CLES"
Database.ClearTagged
SelectionLevel=0
Format=""
FirstRecord
SetSequence "*+MC"
Activate "TFE CATALOGUE"
Database.ClearTagged
SelectionLevel=0
Format=""
FirstRecord
Activate "TFE MOTS-CLES"
Record_Cles=recordcount

For irec=1 to Record_Cles
var_MC=fields("MC")
Activate "TFE CATALOGUE"
ActiveWindow.Select "MC",var_MC ===> erreur
Record_Catalogue=recordcount

For i=1 to Record_Catalogue
var_in=fields("IN")
Activate "TFE MOTS-CLES"
editRecord
GoToField "IN"
Command cmdEnd+cmdControl
TypeText ", "&var_IN
SaveRecord
Activate "TFE CATALOGUE"
NextRecord
Next

SelectionLevel=0
Activate "TFE MOTS-CLES"
'Effacement de la virgule au début de la phrase
EditRecord
GotoField("in")
Command cmdHome
Command cmdDelete
SaveRecord
NextRecord
Next

'Impression des mots clés
Format="TABLE INDEX"
FirstRecord
Print cbxPrintMainRecord

Charles Welling

19-Jun-2006 17:40

Avez-vous vérifié la valeur de la variable var_EM? Vous pouvez le faire comme ça:

var_MC=fields("MC")
MsgBox var_MC
halt

Charles

Mary Doyle

20-Jun-2006 06:38

This is a very useful technique for spotting errors. I often find it helpful, especially if testing the value of several fields or variables, to add an explanation of the test, for example:
MsgBox "The value of var_MC is " & var_MC

Quick Reply

Please log in or register before trying to post a reply.

 
© 2010 Cardbox Software Limited   Home