David R
04-10-2002, 01:32 PM
Is there any way to use both the WHERE clause of a DoCmd.OpenXXXX and the OpenArgs statement to specify the recordsource? When I pass a variable recordsource on to a form in addition to a WHERE clause, it ignores the WHERE clause because the OpenArgs statement sets a new Me.RecordSource in the Form's Load event.
Hope that's clear,
David R
Jack Cowley
04-10-2002, 04:16 PM
Concatenate the RecordSource and other data that you need into the OpenArgs statement separated by a comma or commas. At the other end take the string apart and use the bits as you need them.
David R
04-11-2002, 07:26 AM
Thanks Jack. I had a feeling that was the only viable answer. I managed to get it working by having the RecordSource for the options with a WHERE clause be the default, and the alternate RecordSource be specified without a WHERE clause.