Tabbed datasheet

C

CK

Hi
2nd Question of the day for me, very grateful for any help.

I'm using Access 2007 and discovered tabbed controls but Access Help doesn't
answer my question on using them.

I have a datasheet (formStatements) showing CurriculumStatements with
associated supporting Documents . There are 600 CurriculumStatements in 25
CurriculumAreas. For ease of viewing, I would like to have each
CurriculumArea on its own tab. i can drag formStatements onto each tab but
can't work out how to filter the relevant curriculumstatements for each tab
(i.e. each CurriculumArea)

hope this makes sense
Regards
CK
 
A

Al Campagna

CK,
If I understand correctly... you want 25 subforms, each on it's own tab,
and each displaying records associated with a particular CurriculumArea?
You don't indicate what the Curriculum Area values are, so I'll use "A",
"B", "C"... etc as example values.
Each subform's query will have to be filtered.
For example,
tabA's subform will have a criteria of
CurriculumArea = "A"
tabB's subform will have a criteria of
CurriculumArea = "B"
etc.. for all 25 tabs/subforms
That's using the same subform on 25 tabs... with each subform filtered
for a CurriculumArea.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
A

a a r o n _ k e m p f

it sounds to me like you want _ONE_ form with a tab control at the top






thanks Al

thats right, at the moment I have one long form (formStatements) with 600
entries, so I want to subdivide the form into 25 CurriculumAreas, each Area
on a separate tab. Each tab should display the identical datasheet/controls
but with the data filtered for the relevant Area.

At present, I've dragged the same datasheet (form)  to each tab but I've
looked in the tab/subform Properties and cannot find somewhere to specify
criteria. I can drag a query to each tab which would allow me to stipulate
criteria but surely this would mean saving 25 separate queries?    

Is this correct?

Thanks again
CK



Al said:
CK,
   If I understand correctly... you want 25 subforms, each on it's own tab,
and each displaying records associated with a particular CurriculumArea?
   You don't indicate what the Curriculum Area values are, so I'll use "A",
"B", "C"... etc as example values.
   Each subform's query will have to be filtered.
   For example,
       tabA's subform will have a criteria of
           CurriculumArea = "A"
       tabB's subform will have a criteria of
           CurriculumArea = "B"
       etc.. for all 25 tabs/subforms
   That's using the same subform on 25 tabs... with each subform filtered
for a CurriculumArea.
Hi
2nd Question of the day for me, very grateful for any help.
[quoted text clipped - 14 lines]
Regards
CK- Hide quoted text -

- Show quoted text -
 
A

Al Campagna

CK1,
I ran a test against a form I have with a subform of multiple phone
numbers. I copied that subform to another tab. When I tried to filter one
subform for "Fax" numbers, and the other for "Work" numbers... it failed.
Both subforms took on the last entered criteria.

My mistake... I have to change my response. You'll need 25 individual
subforms in order to be able to filter each one differently.

Using my example values, you'll need a subform (ex. frmAreaA) to handle
"A" Areas, and another form (frmAreaB) to handle the "B" Areas... etc for
all 25 subforms.
Place your cursor in the RecordSource for the Form. (ex. frmAreaA)
Click the three dot (...) button on the right, and enter the criteria
for that particular subform in the query grid.
[Curriculum Area] = "A"
Repeat that for all 25 forms.
Now that's a bit clumsy, but... it will work.

Another suggestion: (one of many ways to do it)
I would create 1 subform (frmCurriculumAreas), that displays ALL records
for ALL Areas. With a combo box (cboAllPossibleAreas) in the header
section, all possible Area values will display, and after selecting a value
(say "B"), and using the combo's AfterUpdate event, you would filter the
subform for only Area "B" records.
If you then selected "H" from the combo, you would remove the "B" filter
and apply an "H" filter... etc...etc
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

CK1 said:
thanks Al

thats right, at the moment I have one long form (formStatements) with 600
entries, so I want to subdivide the form into 25 CurriculumAreas, each
Area
on a separate tab. Each tab should display the identical
datasheet/controls
but with the data filtered for the relevant Area.

At present, I've dragged the same datasheet (form) to each tab but I've
looked in the tab/subform Properties and cannot find somewhere to specify
criteria. I can drag a query to each tab which would allow me to stipulate
criteria but surely this would mean saving 25 separate queries?

Is this correct?

Thanks again
CK


Al said:
CK,
If I understand correctly... you want 25 subforms, each on it's own
tab,
and each displaying records associated with a particular CurriculumArea?
You don't indicate what the Curriculum Area values are, so I'll use
"A",
"B", "C"... etc as example values.
Each subform's query will have to be filtered.
For example,
tabA's subform will have a criteria of
CurriculumArea = "A"
tabB's subform will have a criteria of
CurriculumArea = "B"
etc.. for all 25 tabs/subforms
That's using the same subform on 25 tabs... with each subform filtered
for a CurriculumArea.
Hi
2nd Question of the day for me, very grateful for any help.
[quoted text clipped - 14 lines]
Regards
CK
 
D

Dirk Goldgar

CK said:
Hi
2nd Question of the day for me, very grateful for any help.

I'm using Access 2007 and discovered tabbed controls but Access Help
doesn't
answer my question on using them.

I have a datasheet (formStatements) showing CurriculumStatements with
associated supporting Documents . There are 600 CurriculumStatements in 25
CurriculumAreas. For ease of viewing, I would like to have each
CurriculumArea on its own tab. i can drag formStatements onto each tab but
can't work out how to filter the relevant curriculumstatements for each
tab
(i.e. each CurriculumArea)


Will it not be cumbersome to have 25 tabs on your tab control? If I were
you, I'd be more inclined to have an unbound main form with a single
subform, and also have on the main form a control (combo box, list box, or
option group) for choosing the CurriculumArea. I would use that control
(CurriculumArea) as the Link Master Field and Link Child Field for the
subform, so that the act of choosing a CurriculumArea on the main form
automatically filters the subform to show only the CurriculumStatements for
that CurriculumArea.

If you really want to use a tab control, you can have 25 subforms on 25 tab
pages, and use 25 hidden controls on the main form to serve as the Link
Master Fields for them -- each hidden control set to a constant expression
specifying one CurriculumArea, and serving as the Link Master field for one
of the subforms. However, that seems unnecessary to me, since your tab
control will ensure you can only see one subform at a time.
 
T

Tony Toews [MVP]

CK said:
I have a datasheet (formStatements) showing CurriculumStatements with
associated supporting Documents . There are 600 CurriculumStatements in 25
CurriculumAreas. For ease of viewing, I would like to have each
CurriculumArea on its own tab. i can drag formStatements onto each tab but
can't work out how to filter the relevant curriculumstatements for each tab
(i.e. each CurriculumArea)

I'm with Dirk on this topic. Use a control to filter which of the 25
CurriculumAreas you want to view.

Also consider what happens when they, whoever they might be, add a
26th and 27th CurriculumAreas. And they will.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
A

a a r o n _ k e m p f

you can put a tab control; and then you can put the subform control on
TOP of the tabbed control-- instead of INSIDE one page

that way, you can have the person select a tab on the tabbed document
and you can apply a filter based on the current page of the
tabcontrol.

-Aaron






it sounds to me like you want _ONE_ form with a tab control at the top

thanks Al
thats right, at the moment I have one long form (formStatements) with 600
entries, so I want to subdivide the form into 25 CurriculumAreas, each Area
on a separate tab. Each tab should display the identical datasheet/controls
but with the data filtered for the relevant Area.
At present, I've dragged the same datasheet (form)  to each tab but I've
looked in the tab/subform Properties and cannot find somewhere to specify
criteria. I can drag a query to each tab which would allow me to stipulate
criteria but surely this would mean saving 25 separate queries?    
Is this correct?
Thanks again
CK
Al said:
CK,
   If I understand correctly... you want 25 subforms, each on it's own tab,
and each displaying records associated with a particular CurriculumArea?
   You don't indicate what the Curriculum Area values are, so I'll use "A",
"B", "C"... etc as example values.
   Each subform's query will have to be filtered.
   For example,
       tabA's subform will have a criteria of
           CurriculumArea = "A"
       tabB's subform will have a criteria of
           CurriculumArea = "B"
       etc.. for all 25 tabs/subforms
   That's using the same subform on 25 tabs... with each subform filtered
for a CurriculumArea.
Hi
2nd Question of the day for me, very grateful for any help.
[quoted text clipped - 14 lines]
Regards
CK- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -
 

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