On Sat, 15 Jan 2011 17:16:59 -0000, "CharlieNews"
<(E-Mail Removed)> wrote:
>I would like to add and OR option to the link criteria to:
>stLinkCriteria = "[Quote]=" & Me![QuoteNumber]
Sure. The stLinkCriteria variable just needs to contain a text string
containing a valid SQL WHERE clause (without the word WHERE). You can see how
such a string is constructed by just using the query design window to build
the query you want, and then viewing this query in SQL view; see what's after
the keyword WHERE.
In this case it would be:
stDocName = "Quote Details"
stLinkCriteria = "[Order]=" & Me![Order Number Combo] & " OR [Quote] = " _
& Me![QuoteNumber]
DoCmd.OpenForm stDocName, , , stLinkCriteria
This string should look like
[Order]=123 OR [Quote] = 36
if you use Debug to step through the code and view the stLinkCriteria value.
--
John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/For...-US/accessdev/
http://social.answers.microsoft.com/.../en-US/addbuz/
and see also
http://www.utteraccess.com