I have a form which is used to generate a string.
This string is an SQL query which is the record source for a second form.
Is there a way that I can pass this string from the first form to the second
form when the second form is opened within the first form. At the moment I
use a public variable, but for other reasons I think this is quite a risky
approach.
Thanks in advance
simon
Steve Schapel - 20 Mar 2005 22:49 GMT
Simon,
You can use the OpenArgs argument of the OpenForm method when you open
the second form, and then use code on the Open event of the second form
like this...
Me.RecordSource = Me.OpenArgs

Signature
Steve Schapel, Microsoft Access MVP
> I have a form which is used to generate a string.
>
[quoted text clipped - 8 lines]
>
> simon