Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 6th, 2007, 09:34 AM
Registered User
 
Join Date: Mar 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default ACCESS 2002 VBA DoCmd.TransferSpreadsheet

Whenever I use the TransferSpreadsheet command to export data to an Excel sheet, it always populates a quote character (') in the 1st position of all of the columns. How can you avoid this? I tried different arguments to this function, but I can't see the difference. Also, what are the differences between acSpreadsheetTypeExcel9, and acSpreadsheetTypeExcel3 etc.......???

 
Old March 7th, 2007, 08:51 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

The last question first: those are versions of Excel, like 95, 97, 2000, XP, 2003, etc. They each have version numbers and supported features.

As to the apostrophe, I know there is a way to remove it (saw it in one of my reference books) but can't find it. Excel puts it there to indicate that the field is text, and not numeric. Excel ignores it and does not display it, except in the text bar. Is this causing problems with your Excel actions? If so, perhaps transferring to a template would work better if you need the cells formatted, or get down and dirty and format the spreadsheet from Access.

mmcdonal
 
Old March 7th, 2007, 09:28 AM
Registered User
 
Join Date: Mar 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you so much mmcdonal for responding. The data gets produced from ACCESS into EXCEL and then is used by downstream folks for various reasons. My client is afraid that the apostrophe will cause problems for users who have scripts which go against this data, and will now encounter that 1st character. You're saying however that this may not be the case? Also..a general Forum Question..this is my 1st topic that I've posted. How do you navigate around here? Meaning..best way to find answers to topics you may have questions on? Best way to locate your own Topics...I only see filters for the day that topics get posted etc....

 
Old March 7th, 2007, 10:03 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I bet that even if you tried to refer to those apostrophes with a script, you couldn't do it. Execute one and see what happens.



mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can 'DoCmd.TransferSpreadsheet' do this? travismallen Access VBA 5 March 16th, 2007 05:31 PM
DoCmd.GoToRecord Error in Access VBA myth12345 Access VBA 4 February 16th, 2006 01:58 AM
DoCmd.GoToRecord Error in Access VBA myth12345 Access VBA 1 October 30th, 2004 07:29 AM
DoCmd.GoToRecord Error in Access VBA myth12345 Access VBA 1 October 28th, 2004 10:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.