Macro/RunCode - referencing a listbox on a subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a shortcut menu on a listbox that calls a macro. The macro passes the
listbox to a function via the RunCode command.

This works fine when my form is not a subform, but it doesn't work when I
place my form on another form (where it needs to be).

I've tried using [forms]![mainform]![subform]!listbox and a million other
combinations, but nothing is working.

There must be something tricky about sending a listbox, or other control
value to a macro when the macro is called from a subform, no?

Thanks.
 
Yep, that's two for two... I'm answering my own questions like crazy!

In my expression, I was using the form name of the subform, not it's name as
it sat on the main form.

it works now.
 
Back
Top