A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

controling the spread of fields in the excel



 
 
Thread Tools Display Modes
  #1  
Old January 8th, 2007, 12:01 PM posted to microsoft.public.access.forms
thread
external usenet poster
 
Posts: 334
Default controling the spread of fields in the excel

Hi all,
I'm trying to find a way to export the data in the form into excel.
is there a way to decide on the fields and culomns that are been
exported to the excel file?

  #2  
Old January 8th, 2007, 01:33 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 1,555
Default controling the spread of fields in the excel

If I understand correctly, you are trying to control which fields are
exported to Excel.

You can do this by export a query, rather than a form. In your query, limit
the fields.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/


"thread" wrote in message
ups.com...
Hi all,
I'm trying to find a way to export the data in the form into excel.
is there a way to decide on the fields and culomns that are been
exported to the excel file?


  #3  
Old January 8th, 2007, 01:40 PM posted to microsoft.public.access.forms
thread
external usenet poster
 
Posts: 334
Default controling the spread of fields in the excel

is there a way to place SQL sentence inside of an ADO object and that
way it will be much more dynamic for me to do any changes

Jeff Boyce ëúá:
If I understand correctly, you are trying to control which fields are
exported to Excel.

You can do this by export a query, rather than a form. In your query, limit
the fields.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/


"thread" wrote in message
ups.com...
Hi all,
I'm trying to find a way to export the data in the form into excel.
is there a way to decide on the fields and culomns that are been
exported to the excel file?


  #4  
Old January 9th, 2007, 02:11 AM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 1,555
Default controling the spread of fields in the excel

I'm afraid I don't have any experience in that area.

Good luck!

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/

"thread" wrote in message
ups.com...
is there a way to place SQL sentence inside of an ADO object and that
way it will be much more dynamic for me to do any changes

Jeff Boyce ëúá:
If I understand correctly, you are trying to control which fields are
exported to Excel.

You can do this by export a query, rather than a form. In your query,

limit
the fields.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/


"thread" wrote in message
ups.com...
Hi all,
I'm trying to find a way to export the data in the form into excel.
is there a way to decide on the fields and culomns that are been
exported to the excel file?


  #5  
Old January 9th, 2007, 06:13 AM posted to microsoft.public.access.forms
John Nurick
external usenet poster
 
Posts: 492
Default controling the spread of fields in the excel


I'm not sure, but your VBA code can assign an SQL statement to a query
on the fly, e.g. (code snippet)

Const QToExport = "qryExportQuery"
Dim SQL As String

SQL = "SELECT "
'append list of fields to SQL
...
SQL = SQL & " FROM MyTable "
SQL = SQL & " WHERE ...
...

'Assign new SQL statement to query
CurrentDB.QueryDefs(QToExport).SQL = SQL

DoCmd.TransferSpreadsheet acExport, , qryExportQuery


On 8 Jan 2007 05:40:31 -0800, "thread" wrote:

is there a way to place SQL sentence inside of an ADO object and that
way it will be much more dynamic for me to do any changes

Jeff Boyce ëúá:
If I understand correctly, you are trying to control which fields are
exported to Excel.

You can do this by export a query, rather than a form. In your query, limit
the fields.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/


"thread" wrote in message
ups.com...
Hi all,
I'm trying to find a way to export the data in the form into excel.
is there a way to decide on the fields and culomns that are been
exported to the excel file?


--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
  #6  
Old January 9th, 2007, 02:33 PM posted to microsoft.public.access.forms
thread
external usenet poster
 
Posts: 334
Default controling the spread of fields in the excel

thanks,i believe that should do
John Nurick כתב:
I'm not sure, but your VBA code can assign an SQL statement to a query
on the fly, e.g. (code snippet)

Const QToExport = "qryExportQuery"
Dim SQL As String

SQL = "SELECT "
'append list of fields to SQL
...
SQL = SQL & " FROM MyTable "
SQL = SQL & " WHERE ...
...

'Assign new SQL statement to query
CurrentDB.QueryDefs(QToExport).SQL = SQL

DoCmd.TransferSpreadsheet acExport, , qryExportQuery


On 8 Jan 2007 05:40:31 -0800, "thread" wrote:

is there a way to place SQL sentence inside of an ADO object and that
way it will be much more dynamic for me to do any changes

Jeff Boyce ëúá:
If I understand correctly, you are trying to control which fields are
exported to Excel.

You can do this by export a query, rather than a form. In your query, limit
the fields.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/


"thread" wrote in message
ups.com...
Hi all,
I'm trying to find a way to export the data in the form into excel.
is there a way to decide on the fields and culomns that are been
exported to the excel file?


--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.