Marshall, thank you for your help. SPOT ON!!!!!! Quick, easy, and highly
functional.
THANK YOU!!!!
"Marshall Barton" wrote:
> Krykota wrote:
>
> >In Access 2007, I have a main form housing a tab control. On one page of my
> >tab control, I have two subforms. The first subform lists my customers
> >getting the data from a query in which I merge the first and last names and
> >have a customer id (two fields). This form presents data in a continuous
> >form list. The second subform has the detailed information on the customer.
> >
> >My goal and intent is to be able to click either on a button (linked to the
> >customer id), the name of the customer, or even utilize toggle buttons (in
> >which the caption is the customer name - preferred as a method to highlight
> >the selected customer) and the detailed data on the customer is displayed in
> >the second subform.
> >
> >I have tried doing an OnClick macro on the name, however, I am unable to
> >direct my attention into the correct form (says it cannot find the form) even
> >when I use the wizard to create the macro.
> >
>
> I don't do macros, but if you can live with a little VBA
> code or can translate VBA to a macro, you can synchronize
> two subforms automatically without a button or any other
> user action.
>
> Add a hidden text box (named txtLink) to the main form.
> Then add a line of VBA code to the continuous subform's
> Current event procedure:
> Parent.txtLink = Me.theprimarykeyfield
>
> With that in place, the single view subform control can set
> the Link Master property to txtLink and the Link Child
> property to theprimarykeyfield.
>
> This way the single view subform will always display the
> details for whatever record you make current in the
> continuous subform, regardless of how you navigate to it.
>
> --
> Marsh
> MVP [MS Access]
> .
>
|