Api Access version trouble

  • Thread starter Thread starter Chris via AccessMonster.com
  • Start date Start date
C

Chris via AccessMonster.com

I have incorporated an Api call for a dialog Save As/Export box, works fine
on my machine Access '03(Development machine)**Saved as a 2000 DB.

However, when I tried to deploy it to a user (Access '02) I received an
object error message or something like that (should have wrote it down).
Anyone else have this problem or can someone diagnos it I looked up the
references and the only difference between theirs and mine was the version
of Access 11.0 vs. 10.0 could that be it doesn't sound right to me.?.
 
Without knowing the actual code you're using, and the actual error message,
it's virtually impossible to offer any advice.
 
Sorry about not being specific enough... I was able to get more access to
the machine now. When I try and click the button the calls the api save as
code I get an error message "Can't find Project or Library".

The code is listed below gets hung up at the "strSaveFileName =
ahtCommonFileOpenSave" This code calls the Function code on the
http://www.mvps.org/access/api/api0001.htm site.
I did not change any of that code.

Reminder it works on Access '03 and not Access '02

Private Sub Command37_Click()
Dim strFilter As String
Dim strInputFileName As String

'Note that in order to call the Save As dialog box, you can use the same
wrapper function by just setting the OpenFile option as False. For example,


'Ask for SaveFileName
strFilter = ahtAddFilterItem(strFilter, "xls (*.xls)", "*.xls")
strSaveFileName = ahtCommonFileOpenSave( _
OpenFile:=False, _
Filter:=strFilter, _
Flags:=ahtOFN_OVERWRITEPROMPT Or ahtOFN_READONLY)

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "HIM",
strSaveFileName, 1, "HIM"
End Sub
 
Does the application compile in Access 2002? It could be a problem with
references.

Also, what did you name the module when you saved it? The module name cannot
be the same as any functions or subs in the database.
 
Back
Top