Insert databases - empty query warning

S

Sandy

I am using {database} to insert several sections of
information into a report. However some of these sections
may be empty and in these cases Word gives a warning "Word
could not insert the results because your query generated
an empty result".

Is there some way of suppressing this warning so that the
user does not have to sit there pressing enter or clicking
OK every so often?
 
P

Peter Jamieson

You can certainly try the following, but I can't guarantee it will eliminate
the messages.

Esentially, use

{ IF { DATABASE field with a SELECT count query } = 0
""
"{ DATABASE field you really want }" }

e.g. if your query is SELECT * FROM xyz, then try using "SELECT count(*)
FROM xyz" in the first DATABASE field. Ensure that the field does not have
the \h switch. In that case, a scalar value is returned and Word does not
try to turn it into a table.
 

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