Re: Transfer Spreadsheet acExport - Table with added column won't export

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Ken,

As I replied the first time, when the user chooses to not add STD3 or Medians,
the export worked fine - until I added the brackets, that gives me the "Not
Updatable" message. Here is the sub for that (Without brackets or brackets
being added to strings):

sub MakeXLSMeasure
dim MyPath
Mypath = CurrentProject.path
dim QueryName as string
dim OldQueryName as string
dim MyFile as string

OldQueryname = QueryName

Queryname = Replace(QueryName, " ", "")
-- There are replacements for each character that is not acceptable in an
Excle name.

MyFile = Mypath & "\" & QueryName & "" & ".xls"
docmd.transferspreadsheet acexport, acspreadsheettypeexcel9, oldQueryName, My
File

End sub

I removed the brackets from QueryName and MyFile strings. Doing it this way,
it works when the the table to export has not been altered, but fails when
fields have been added and gives me the orginal message of The Microsoft
Database Engine could not find the object ''.....

Thanks Again Ken!

Ken Snell (MVP) wrote:
This error usually means that there is a problem with the path or file name
for the EXCEL file -- path doesn't exist, path + filename string is too
long, file extension is invalid for EXCEL file type (needs to be .xls), you
don't have privileges to the folder where you want to put the file, etc.

Post the entire VBA code for what you're doing so that we can see the whole
picture.

Ken,

[quoted text clipped - 13 lines]

Walkabout

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200710/1

.



Relevant Pages

  • Re: Put parentheses around figures
    ... numbers in brackets are typically regarded as -ve. ... Regards, Andreas ... Dim ws As Worksheet ... Function fnRegEx(str As String, ...
    (microsoft.public.excel.programming)
  • RE: Problem with PRINT REPORT TO PDF
    ... and like I said Brackets always ... Dim var_Item As Variant, str_formName As String ... As String, str_phrase As String, str_phrase1 As String ... Dim a_Test As String, a_carsAs Boolean, lcv As Long ...
    (microsoft.public.access.modulesdaovba)
  • Re: Bracketed types
    ... The brackets around a keyword ('String' is actually a keyword) remove the keyword semantics. ... Dim As Foo ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Transfer Spreadsheet acExport - Table with added column wont export
    ... the export worked fine - until I added the brackets, ... dim MyPath ... dim OldQueryName as string ... for the EXCEL file -- path doesn't exist, path + filename string is too ...
    (microsoft.public.access.formscoding)
  • Search pattern
    ... Dim strfile As String ... Dim bAddressFound As Boolean ... Dim strCurrentChar As String ...
    (comp.databases.ms-access)