Thanks for the reply. I have added the code and it works. But it raises for
me a number of questions as a learner who wants to understand, not just copy…
1. What does “Me” mean in VB code? I’ve seen it often, but there is no
reference to it in my help files.
2. Now that I have an event procedure attached to the load event of Form2,
does that mean Form2 will always open to a new record and set the values?
What about when I want to open Form2 just with existing records?
3. I still don’t have a clue about setting values generally in code. What
if I want to set the value of more than one control? Or if I want to set a
value after the form is open? Are there any general guidelines? Where might
I look in Help or for articles online?
> Thanks for the reply. I have added the code and it works. But it
> raises for me a number of questions as a learner who wants to
> understand, not just copy.
>
> 1. What does "Me" mean in VB code? I've seen it often, but there is
> no reference to it in my help files.
The current VBA "container". If the code is running in a form's module then Me
refers to the form in the same way that Forms!NameOfForm does. It is nicer
though because you can change the name of the form and the code doesn't break
and/or you can copy code from one form to another and not have to worry about
the name being different.
> 2. Now that I have an event procedure attached to the load event of
> Form2, does that mean Form2 will always open to a new record and set
> the values? What about when I want to open Form2 just with existing
> records?
It is the acFormAdd argument of the OpenForm method that is causing Form2 to go
to a new record. If you open Form2 in other code without using acFormAdd then
it will show existing records. If you know you will do this then you need to
change your OnLoad code so that it only uses OpenArgs when OpenArgs actually has
a value.
If Len(Nz(Me.OpenArgs, "")) > 0 Then
Me![Form1Link] = Me.OpenArgs
End If
> 3. I still don't have a clue about setting values generally in code.
> What if I want to set the value of more than one control? Or if I
> want to set a value after the form is open?
Me.ThisControl = SomeValue
Me.ThatControl = SomeOtherValue
(as many more lines as you want)
Where you obtain the values will vary from one circumstance to the next. The
form has many events and many of those events could be used to run code to set
the value of a control. Which event is appropriate is again going to vary from
one circumstance to the next.
> Are there any general
> guidelines? Where might I look in Help or for articles online?
There should be a topic on Form Events. That would be a good place to start.

Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com