Passing parameters between forms

  • Thread starter Thread starter Simon Webb
  • Start date Start date
S

Simon Webb

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
 
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
 
Back
Top