Populate Table from Access

M

MTechG

I've got a template document I'm setting up and would like to populate a
table from Access. I already populated fields inside the template from
Access with VBA. Using Word/Access XP

Any hints?

TIA
 
D

Doug Robbins - Word MVP

What do you want to populate the table with? - Data from a single record? -
Data from Multiple Records? - Data from all of the Records? - of just some
of them? If the latter, what is the criteria for selecting the ones from
which the data is to be used?

Sorry, more questions than answers.

--
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
 
M

MTechG

Doug

I'm looking to populate the table with multiple records for a query. I
tried mail merge and I have six records that are in the query now and I add
the field project in the table and the document is created six times. From
what I've been reading I believe it can be done in mail merge it's just I'm
doing something wrong.

Dennis
 
D

Doug Robbins - Word MVP

Why not use an Access Report?

Sounds like you are probably trying to perform a "multiple items per
condition (=key field)" mailmerge which Word does not really have the
ability to do:

See the "Group Multiple items for a single condition" item on fellow MVP
Cindy Meister's website at

http://homepage.swissonline.ch/cindymeister/mergfaq1.htm#DBPic


Or take a look at the following Knowledge Base Articles

http://support.microsoft.com/default.aspx?scid=kb;en-us;302665


http://support.microsoft.com/default.aspx?scid=kb;en-us;294686

--
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
 
M

MTechG

Doug

Thanks for those links I'm looking into them now. I wish I could use a
report but the template that I'm populating is for a Quoting system so there
is a lot of text to add and each one is different.

I'm looking at the compound merge right now. What I was thinking about was
maybe a looping scenario to populate the table on the fly. Create the table
based on knowing how many rows and columns and insert the data using the loop
and offsets. I've done something like this in Excel but Word is a different
animal.

I'm going to look at creating a table on the fly in a Word Document knowing
how big the table needs to be.

The loop would be my next step which is probably going to be the toughest
part of the whole thing.

Let me know what you think about this scenario if it's worth attempting I
think it is but I don't have a lot of experience with coding with Word.

TIA
 
D

Doug Robbins - Word MVP

It is definitely possible using vba.

--
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
 
M

MTechG

Doug

Just finished up my Create Custom Table Sub and now going to brain storm on
looping through and pasting values into the table. Have you done anything
like this? I notice your name quite a bit when I search in Google groups
looking at code samples.

Dennis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top