Hi Pete,
I don't think you mentioned which versions of Access and Excel that you are using. I used
Access 2002 and Excel 2002, each with Service Pack 2 applied. My operating system is
Windows 2000 Server with Service Pack 4. Do you have the latest Service Packs for your
software? As I mentioned previously, I cannot duplicate your findings when exporting the
table directly.
Have you tried the code based method that I provided? This might be the simplist,
especially if you have a recurring need to export the data to Excel.
Tom
______________________________________
Hi Tom I exported the table to excel, and it still does not transfer 3A correctly, but if
I go to the table, and add a period (.) at the beggining of 3A it transfers it correctly.
______________________________________
Hi Pete,
I cannot reproduce your observation when exporting a table or query to Excel.
However, if
I try exporting a report to Excel, then the 3A does show up as 0.125, while the 3S
and 3F
transfer correctly. Suggestion: Don't start with a report as the source object, if
that
is what you are doing.
Select the table or query. Use File > Export... and select Excel.
Alternatively, you can use a command button on a form, with the following code. This
example uses a query named "qryAllSalesFigures". FullPathToSpreadsheet.xls is the
full
path + filename of the desired Excel spreadsheet (Example: C:\Temp\Output.xls).
Private Sub cmdSalesSheet_Click()
On Error GoTo ProcError
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
"qryAllSalesFigures", "FullPathToSpreadsheet.xls"
MsgBox "Sales spreadsheet exported"
ExitProc:
Exit Sub
ProcError:
MsgBox "Error: " & Err.Number & ". " & Err.Description
Resume ExitProc
End Sub
Tom
_______________________________
I am trying to convert a table from Access to Excel, evertything works fine, but only
one
thing,I have a field named code, and I used 3A, 3S, and 3F, on Access works fine,
but
when I converted to Excel, 3S and 3F appeared with no problem, but instead of showing
3A,
it shows .125 Does anyone knows why? I appreciate your help.