Results 1 to 2 of 2
  1. #1
    Uranium Lounger
    Join Date
    Jan 2001
    South Carolina, USA
    Thanked 0 Times in 0 Posts

    Re: RunCode error (97)

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

  2. #2
    2 Star Lounger
    Join Date
    Jul 2001
    Thanked 0 Times in 0 Posts

    RunCode error (97)

    <P ID="edit" class=small>Edited by gwhitfield on 01-Jan-02 22:19.</P>** cross-posted <A target="_blank" HREF= w=&sb=&o=&vc=1>here</A> **

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts