reference a control on a form

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

I have a form with a tab control. The tab control has two
pages, with a list box on page2. How do i reference the
list box from another form so I can requery it?

I tried this but it didn't work:

Dim ctl as control

set ctl = Forms!Form1!tabMyTab!Page2!lstMyList
ctl.requery
 
The tab control and its pages are not part of the reference. Just use:
set ctl = Forms!Form1!lstMyList
 

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

Similar Threads

VBA to clear controls 2
Pass Control as Argument 3
go to control 1
Controls in form 2
Help with looping thru controls on a form 2
.AddItem function 3
Multi Select List box 10
change control type 3

Back
Top