• RunCode error (97)

    Author
    Topic
    #364695

    Those is a MSAccess method/function. You would probably have better luck getting an answer in the Access forum.

    Viewing 0 reply threads
    Author
    Replies
    • #560834

      Edited by gwhitfield on 01-Jan-02 22:19.

      ** cross-posted here **

      Well if i can get this to work that would be great. I entered the code into a VB module in access as follows
      I recived it from another forum but something i am doing is wrong.

      Public Function TrnsfrToXls()

      DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, “Find All Issues by Selected Criteria2”, “C:WINNTProfilesEdward SantevecchiDesktopFind All Issues By Selected Criteria2.xls”

      End Function

      All of the coding is on 1 line correct? The “Find All Issues by Selected Criteria” is not a table but a datasheet created by the query. Is that a problem, if so how would i change that to a table. Have i set the paths up incorrectly?

      My access macro first opens the query (Find All issues….) in DATASHEET view with the mode set to EDIT.

      Then I have output to my xls file (Find all ISSues…)

      I then use RunCode and use the line:
      Function Name = TrnsfrToXls(). {for some reason access says that i have entered the function name incoorectly and it can not find it, have i used an improper format. I thought it was function name = function name().

      Next i close the query. What am i doing wrong with the function name? Why can’t i run the code? Is there something dumb i am missing here with my procedures? Thank you and happpy new year.

    Viewing 0 reply threads
    Reply To: RunCode error (97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: