Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
C Wood
 
Posts: n/a
Default Database into a table

I am trying to setup a document that pulls data from Excel databases and
places the information into a table.

The fieldcode looks like this:
{DATABASE \d "T:\\Program Review\\Program Costs.XLS" \c "Entire Spreadsheet"
\s "SELECT fte FROM T:\\Program Review\\Program Costs.XLS WHERE ((progid =
0201))"}

This works fine when it is used outside of a word table, but when I copy the
field into a table, I get: Error! Not a valid result for table.

What I am trying to do is setup a table that pulls data for 4 years of data
- each year in its own column.

Is there a better way to do this?



  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Database into a table

Maybe just use a catalog (or in XP and later a directory) type mailmerge
main documnet in which you have a one row table with the mergefields in the
cells of that row. When you execute the merge to a new document, it will
contain a table with a row of data for each record in the data source.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"C Wood" C wrote in message
...
I am trying to setup a document that pulls data from Excel databases and
places the information into a table.

The fieldcode looks like this:
{DATABASE \d "T:\\Program Review\\Program Costs.XLS" \c "Entire
Spreadsheet"
\s "SELECT fte FROM T:\\Program Review\\Program Costs.XLS WHERE ((progid =
0201))"}

This works fine when it is used outside of a word table, but when I copy
the
field into a table, I get: Error! Not a valid result for table.

What I am trying to do is setup a table that pulls data for 4 years of
data
- each year in its own column.

Is there a better way to do this?





  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
C Wood
 
Posts: n/a
Default Database into a table

Actually, what I am trying to do is pull specific records into different
documents.

For example, I have a database of college programs with various data such as
enrollment, etc.

I then have a Word document for each specific college program that needs to
pull the data from the database for that pariticular program, and hence my
use of the SQL statement

"Doug Robbins - Word MVP" wrote:

Maybe just use a catalog (or in XP and later a directory) type mailmerge
main documnet in which you have a one row table with the mergefields in the
cells of that row. When you execute the merge to a new document, it will
contain a table with a row of data for each record in the data source.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"C Wood" C wrote in message
...
I am trying to setup a document that pulls data from Excel databases and
places the information into a table.

The fieldcode looks like this:
{DATABASE \d "T:\\Program Review\\Program Costs.XLS" \c "Entire
Spreadsheet"
\s "SELECT fte FROM T:\\Program Review\\Program Costs.XLS WHERE ((progid =
0201))"}

This works fine when it is used outside of a word table, but when I copy
the
field into a table, I get: Error! Not a valid result for table.

What I am trying to do is setup a table that pulls data for 4 years of
data
- each year in its own column.

Is there a better way to do this?






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Table AutoFormat... Luca Fabbri Page Layout 1 January 12th 06 10:40 AM
20x20 multiplication table Bob S Tables 2 December 24th 05 02:27 PM
Table headers/footers and layout Keith Page Layout 1 April 8th 05 07:37 PM
Table AutoFormats vs. Table Styles confusion Tony Jollans Tables 5 March 6th 05 07:18 PM
User-defined table format using Database field code Papy2000 Mailmerge 1 December 19th 04 10:38 AM


All times are GMT +1. The time now is 12:00 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"