On Wed, 28 Apr 2010 03:47:34 GMT, "trevorC via AccessMonster.com" <u44860@uwe>
>I need to create a report of selected Customers, I have gone as far as
>creating a string with customer names in it. Whats next?
>Selected_Customer_Names= [ABC], [test], [New], [A New One] ...... and so on.
>Is this correct for the report and/or how do i open the report with the above
square brackets delimit field or control names. This list won't do what you
want. If you have customers ABC, Test, New and so on; and these names are
unique (names rarely are, I know three guys named Fred Brown), then you could
use a string with the names in doublquotes:
"ABC", "test", "New", "A New One"
and use this string in the WhereCondition argument of the OpenReport action:
DoCmd.OpenReport "MyReport", WhereCondition := "[CustomerName] IN (" _
& Selected_Customer_Names & ")"
But I suspect there are better ways to go about it if you would care to post
some information about your table structures and the context in which you're
John W. Vinson [MVP]