>>You stated you used the following syntax:
>>
>>sParams = "Do LoadData With " + sSourceFile + ", " + sDataPath + ", " + sTableName
>>.DoCmd (sParams)
>>
>>I don't see how the above code ever worked since LoadData is a method. Try the following syntax from VB:
>> oFox.LoadData(sSourceFile,sDataPath,sTableName)
>>
>>Murray
>
>
>Tried it.
>
>
> With oFox
> sSourceFile = sSourcePath + "\MODE2.DAT"
> sTableName = "mode2"
> .LoadData(sSourceFile,sDataPath,sTableName)
>
>
>When I try to move to the next line VB's editor pops up an error dialog:
>
> Compile Error
> Expected =
>
> and won't let me go any farther.
>
>I've been working on this (the application not just this bug) for about fifteen hours now, and concede that I'm probably overlooking something.
>
>If you have additional suggestions I'll be appreciative.
>
>Thanks
>
>Jim
Personally I find Auto Syntax checking quite annoying.
If you want to you can turn it off. From the "Tools: pulldown menu select "Options", then from the editor tab of the options dialog turn off auto syntax check.
As for the error, sorry my oversight, Try
oFox.LoadData sSourceFile,sDataPath,sTableName
since LoadData doesn't return a value and also make sure sDataPath is initialized to something.
Murray
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement