External name not defined

S

SAC

I'm trying to run a subroutine in a module on an after update routine. The
control using the afterupdate event is on the main form and I'm attempting
to set the recordsource of the subform.

I want to use a module instead of re-writing the code for each control on
the main form.

Here's the code in the module that's causing the error:

[frmLookup subform].Form.RecordSource = strSQL

Thanks for your help.
 
G

Guest

I would try something like:
Me.[sfrmCtrlName].Form.RecordSource = strSQL
It may be the name of your subform control is not the same as the name of
the subform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top