String comparison in Word field IF statement

T

Tom Toews

Is it possible to do a string comparison in the IF field. I need to check if
"and" is in the field. The only options I see are mathematical comparisons.

{ IF (InStr({ MERGEFIELD "AuthorName"}, "and") <> 0) "stories" "a story" }

Tom
 
D

Doug Robbins - Word MVP

That is not possible with Word fields. You can however use the Instr()
function in an Access query and the use the query as the datasource.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
T

Tom Toews

Thanks Doug.


Doug Robbins - Word MVP said:
That is not possible with Word fields. You can however use the Instr()
function in an Access query and the use the query as the datasource.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

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