VBA DoCmd.TransferSpreadsheet acExport... Sort Order

I have a table whose fields are sorted in a certain order.  Is there a
way to retain or specify the sort order when using
DoCmd.TransferSpreadsheet acExport... to export to a spreadsheet?
Thanks, Sheldon Potolsky

0
SHPsalm139 (70)
7/26/2007 5:46:15 PM
comp.databases.ms-access 42619 articles. 0 followers. Post Follow

2 Replies
722 Views

Similar Articles

[PageSpeed] 16

Sheldon wrote:
> I have a table whose fields are sorted in a certain order.  Is there a
> way to retain or specify the sort order when using
> DoCmd.TransferSpreadsheet acExport... to export to a spreadsheet?
> Thanks, Sheldon Potolsky
> 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Instead of transferring the table, use a query to retrieve the data in
the sorted order you want and transfer the query.
-- 
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup.  I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRqkE8YechKqOuFEgEQIvpgCgwYQi9bk0AF/rI4LRrKY7u3xmt70AoN65
xA5A2ILnLD/I9qv5uT9l7ype
=HFPW
-----END PGP SIGNATURE-----
0
me2968 (1473)
7/26/2007 8:31:59 PM
On Jul 26, 4:31 pm, MGFoster <m...@privacy.com> wrote:
> Sheldon wrote:
> > I have a table whose fields are sorted in a certain order.  Is there a
> > way to retain or specify the sort order when using
> > DoCmd.TransferSpreadsheet acExport... to export to a spreadsheet?
> > Thanks, Sheldon Potolsky
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Instead of transferring the table, use a query to retrieve the data in
> the sorted order you want and transfer the query.
> --
 Would the syntax be the same except for substituting the SELECT?
query name instead of the table name?
e.g. Would
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"tblAbsenceNotesSent", InputFileHSMS & "AllLetters.xls", True
become
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Query1",
InputFileHSMS & "AllLetters.xls", True
Sheldon Potolsky


0
SHPsalm139 (70)
7/27/2007 5:29:49 PM
Reply:

Similar Artilces:

I make Database in Ms Access at order
I make Database in Ms Access at order I good read but week speech and understand speech, If You want take me order please exactly describe working of database stachu from Poland mail: stachuf11@wp.pl phone 048 0505120881 Stachu, A database is an electronic means to store data. Things get much more interesting and complicated from there. I don't speak or write Polish and your English isn't very good. But try being more specific about what your database is for and I'll try to be more helpful. "stachu" <onet_stachuf1@poczta.onet.pl> wrote in message news:63f107...

Create MS/ACCESS database app for non-ms/access users
Is it possible to create an MS/ACCESS database application and package it for users who do not have MS/ACCESS loaded in their PCs? I was told that this is possible, but I don't know what software is needed. Do you know? If so, please answer this post. Thanks. SueB *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! Per Sue Bricker: >Is it possible to create an MS/ACCESS database application and package >it for users who do not have MS/ACCESS loaded in their PCs? > >I was told that this is possible, but...

I can make databases in Ms Access on order
I can make databases in Ms Access on order my phone number 048 505120881 mail: stachuf11@wp.pl "stachu" spammer@deleted.not wrote > I can make databases in Ms Access on order Please review the FAQ and charter at http://www.mvps.org/access/netiquette.htm. Advertising and employment solicitation are prohibited in USENET newsgroups unless the group's charter specifically permits it. The charter of comp.databases.ms-access does not specifically permit advertising. Larry Linson wrote: > "stachu" spammer@deleted.not wrote > > > I can make databases i...

Set sort order in MS Access 2000 report
Hello, I have a report with the Priority field is used as sort order and grouping. The problem is the data in this Priority field if sorted in ascending order is: High, Low, and Medium. How could I sort it as: Low, Medium, High? Any suggestion is greatly appreciated, James James, Don't know how you can, but what you could do is base the report on a query. In the query add the fields you want for your report then add the below statement to the top row (Field:) of an empty column in you query grid txtSort: IIf([Priority]="Low",1,IIf([Priority]="Medium",2,IIf([Priori...

Sort Order changed in Access 2003 Back End database
I have a strange problem with a split Access 2003 database that is now sorting the records on an ID number, where it wasn't previously. Until now, when the users viewed the data that they keyed, it was displayed in the order in which it was keyed. In other words, each new recorded was appended at the end (which is how they preferred it). A couple of weeks ago, I made some minor changes to the program. The most significant change was adding a new field (a 1 character boolean flag) to one of the tables. When I installed the changes on the user's LAN, I imported 2 of their permanent ta...

MS Access VBA making multiple tables in database from a main table.
I have a database table called "tbl_personal" and struggling to VBA program a bit of code to create multiple tables in a database from the main "tbl_personal" table. In this case the 'color' column is the field I would like to look at. 1. Identify the number of unique records in column 'color' 2. For each color record that is label as red in the "tbl_personal" table, create a table called 'red' and populate with all red records in from the "tbl_personal" table. 3.Then move onto the next unique color and repeat the whole process...

Access MS-ACCESS database on server from client????
I m currently developing a java based application and want to know how can i make client access database located on the server? "HeMan_Speaks" <Lunar20092010@gmail.com> wrote in message news:d71ce567-0434-48b8-b1d2-bb191706ab45@w8g2000prd.googlegroups.com... >I m currently developing a java based application and want to know how > can i make client access database located on the server? I think you're going to have to expand a little bit more in your question here, as is not 100% quite clear what you're trying to do. You might want to make a little bit of a d...

access to MS Access password-protected database?
Can anyone direct me towards a code snippet showing how to use Python to insert data into a password-protected MS Access database? My google searches have been uninformative for dbs that are password-protected. Thanks, Ken On Feb 11, 10:43=A0am, Ken McDonald <kmmcdon...@medicine.wisc.edu> wrote: > Can anyone direct me towards a code snippet showing how to use Python =A0 > to insert data into a password-protected MS Access database? My google = =A0 > searches have been uninformative for dbs that are password-protected. > > Thanks, > Ken You post is a little vague...

request for explanation on access an database in ms access
This is the code that I found on the internet for accessing an ms access database: import java.sql.*; class Test { public static void main(String[] args) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // set this to a MS Access DB you have on your machine String filename = "d:/java/mdbTEST.mdb"; String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ="; database+= filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end ...

MATLAB command to access MS Access database
Hi! Is there a MATLAB command which gives access to a .mdb MS Access database or do I need a special driver? Thanks, Andree Hi Andree Ellert, you can use activeXcontrol to interact with MS-Access database. access = actxserver('Access.Application'); returns the handle for Access. set(access, 'Visible', 1); will show the opened Access window. use get(access) and set(access) commands to find the methods available to call. -Vadivelu M =========== http://www.mathworks.com/access/helpdesk/help/toolbox/database/datatool.shtml "Andree Ellert" <ellert@gmx.net////...

Accessing a MS Access database across two servers
Hi The technical support guys at my company have set up my system so that the server containing the MS Access database is on one server, while the pages that should access the database are on another server. When the pages and database are on the same server, I usually just connect through ODBC. The problem is that I don't know how to set up an ODBC connection to link from one server to a database in another. Anyone know what I am getting at and know of a possible solution, or a link to a site which may help. thanks in advance Brendan "Singularity" <Brendan.Collins@Sin...

Redhat Apache to access MS-Access Database through PHP
Hi, I am wondering if anyone knows how to make this work. I have Redhat Liux ES v2.1 Server Apache 1.3 PHP 4.0 a MS-Access MDB file (just the file, already created) The MS-Access file is already in the Redhat Linux server. Is there a way I can make Apache & PHP to access this MS-Access MDB file? Thank you. ...

Using VBA to toggle from MS Word to MS Access?
Access 2003, Windows XP SP2 I have an application that generates a word document populated with a variety of fields from Access tables. The word document is generated when the user presses a button (cmdGenerateAgreement) on a form (frmTransaction). I want the process to work as follows: 1. User presses button 2. Word document is opened and populated 3. Access screen becomes visible with a message box 4. User presses Ok 5. Word screen becomes visible for finalization My question is how do I achieve steps 3 and 5? I've tried SetFocus, Access Web's API: Manipulate Window (fSetAccessW...

Best way to access a remote MS ACCESS database
What is the best way, via the internet, to access a remote Microsoft Access database? I was thinking of using VPN, but I thought that I would check here to see if there is a better way. Any suggestions? Thanks Do you mean remotely controlling an Access database, or linking tables over the internet? The first is doable, the second is a recipe for disaster. Remote Control: If your remote OS is Windows XP, you can use Remote Desktop (although only 1 person can access the PC at a time; this will change in the upcoming Service Pack for XP, but that may not help you now). Otherw...

Web resources about - VBA DoCmd.TransferSpreadsheet acExport... Sort Order - comp.databases.ms-access

Resources last updated: 2/5/2016 12:34:32 AM