ControlSource Subform within Tab Page

A

Alan

I hope this is a relatively simple question

I have a form that has 8 tabbed pages. On each page I have included a
subform(same subform on each page just different filered results on a single
table)

Can I re-use the same subform repeatedly and if so how do I cause this to
requery on selection of another tab ??

Sorry if this is simple, but have been scratching my head for what seems a
long time now

--
Many Thanks for any suggestions

Regards

Alan
 
D

Damon Heron

Instead of 8 tabbed pages, how about one page, one subform and an option
group that filters the subform based on the user selection?

Damon
 
A

Alan

Damon

I understand what your are hinting at, but the format of the Form is to use
tabbed pages whith the potential for other pages being added.

This is a request from others who use my Db and wish to keep it simple from
their perspective. It currently works using tabs and multiple queries,
however there is a desire to use colours on the rows of the form and hence
the use of a continuous sub form
 
D

Damon Heron

Okay, if you insist on using the tabs, select the tabctl (which is the frame
around all the tabs) and use the change event.

Private sub TabCtl_ Change()

then use either an if statement or a Select Case stmt.

if tabctl.value= 1 then
do this.....
etc.
end if

With 8 tabs, a select case statement would be preferable.

Select Case TabCtl.value
case 1
do this
case 2
do that....
Case 3
............
etc.
end select

Damon
 
A

Alan

Damon

Once again thanks for the update. In danger of being a pest, can you tell me
the VBA for assigning the controlsource

I have tried a variety of combinations, however appear to be getting
something wrong !!

Forms!sfrmUpdate.ControlSource =""

doesnt appear to work in the change event ??
 
D

Damon Heron

referring to a subform from the main form:

Me!subfrmUpdate.Form.RecordSource =

From the subform itself:

me.recordsource=


Note RecordSource, not controlsource

Damon
 

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