Re: Automatically populate a form field

From: Leah (anonymous_at_discussions.microsoft.com)
Date: 04/14/04


Date: Wed, 14 Apr 2004 09:13:07 -0700

Okay this worked but now I notice that when form 2 opens,
I am forced to jump through the records in order to find
the corresponding one. It starts with the first record in
the form 2 table rather than the record that corresponds
to the Main Form. Thoughts?

>-----Original Message-----
>Thank you!
>
>
>>-----Original Message-----
>>If Form2 is being opened as non-modal, your code should
>>look something like
>>DoCmd.OpenForm "Form2"
>>Forms!Form2!txtCustomerName = Me.txtCustomerName
>>
>>You will have to change txtCustomerName to the control
>>names that you have on your forms.
>>
>>Hope This Helps
>>Gerald Stanley MCSD
>>>-----Original Message-----
>>>If I have 2 forms, one being the main form and the
>second
>>>being form two, how can I populate a field in form 2
>when
>>>it is triggered by the main form?
>>>
>>>For instance, If I select and option button in the main
>>>form that triggers form 2, I would like the name of the
>>>Customer from the main form to be populated in the form
>2
>>>CustomerName field.
>>>
>>>Any help would be appreciated. Thanks!!
>>>.
>>>
>>.
>>
>.
>