View Single Post
  #3  
Old May 28th, 2010, 03:16 PM posted to microsoft.public.access.forms
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default Click a subform field to open relevant form

On Thu, 27 May 2010 18:45:35 -0700 (PDT), Lord Kelvan
wrote:

Actually that should be:
[ID]=[Forms]![ frmSwitchboard]![subfrmswitchboard].Form![ID]

The way I think about this syntax is that [Forms]![
frmSwitchboard]![subfrmswitchboard] accesses the subform control, so
you could inspect its properties (e.g. Left, SourceObject, etc).
..Form makes you step into the (sub)form and now you can access the
controls in that form.

-Tom.
Microsoft Access MVP


You need to reference the subform through the mainform because the
subform is not "open" as per say in the [forms] collection

Use the condition

[ID]=[Forms]![ frmSwitchboard]![subfrmswitchboard]![ID]

If you open this subform as a normal form as well then tell me and you
need to do something more complicated as this condition will not work
in that case.

Regards
Kelvan