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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
retrieve a empty list when using an Access query
Im trying to merge an Access 2003 query result into a Word 2003 doc. If I run
the query in Access i produce a list of results. When I attach the query to the Word doc the imported table is empty? |
#2
|
|||
|
|||
retrieve a empty list when using an Access query
You are probably using wildcard characters in a LIKE clause in the Query.
Access only recognises the Jet ones (* and ?) unless the database has been modified to recognise the ANSI ones (% and _). OLE DB, which Word 203 uses by default to get the data, only recognises the ANSI ones. If that is the problem, your options include: a. connect using DDE, which uses Access to execute the query (check Word Tools-Options-General-COnfirm conversions at open, then go through the connection process again and choose the DDE option when it is offered. b. modify the Access database so the ANSI wildcards are recognised (it's an option somewhere in access). It's difficult to recommend this because the change may affect a lot of existing software and you will probably have to change all the queries. c. have two versions of each query that uses wildcards - one that uses the Jet wildcards, the other that uses the ANSI ones, and pick the appropriate query d. if the query is shorter than either 255 or 511 characters long (a limitation in Word), issue the ANSI version of the query in a Word VBA OpenDataSource call. Peter Jamieson "ChrisK" wrote in message ... Im trying to merge an Access 2003 query result into a Word 2003 doc. If I run the query in Access i produce a list of results. When I attach the query to the Word doc the imported table is empty? |
Thread Tools | |
Display Modes | |
|
|