Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

runcode problem

Status
Not open for further replies.

scrappe7

Technical User
Jul 30, 2001
82
US
Well if i can get this to work that would be great. I entered the code inot a module as follows

Public Function TrnsfrToXls()

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "Find All Issues by Selected Criteria2", "C:\WINNT\Profiles\Edward Santevecchi\Desktop\Find 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 chenage that to a table. Have i set the paths up incorrectly?

My access macro 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 ahpy new year.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top