Tab Controls

W

Wendy Parry

Hi,
I posted on this before but no one has had any suggestions, or I didn't
explain very well.

I have a recordset, which has a varying number of records according to
the number of subjects a student studies.

I would like to extract the data for the same field throughout the
recordset and display its contents in a separate page on a tab control.

My pseudo code is something like this:

Start
Go and get the records required
For each record in the recordset
Open the tabbed subject report in design mode
Add a new page to the tab control
Add a text field control
Connect the recordset datasource tblAcadGrade.Term source
Next record


I have the following code to add a page to the tab control:
Function AddPage() As Boolean
Dim frm As Form
Dim tbc As TabControl, pge As Page


On Error GoTo Error_AddPage
Set frm = Forms!testTabControl
Set tbc = frm!TabCtl1
tbc.Pages.Add
AddPage = True

Exit_AddPage:
Exit Function

Error_AddPage:
MsgBox err & ": " & err.Description
AddPage = False
Resume Exit_AddPage
End Function

But need to work in the data from the records. Or if you have any other
ways of approaching this I'm open to suggestion. (The only problem that
each subject has it's own assessment record and I can't use the XTab as
it assumes that every pupil studies every subject unless I look for null
values, but then that wouldn't work as some staff may not have written
their reports on time)

Please any help would be well received, I have to finish my uni project
by the end of the month.
 
L

Lynn Trapp

W

Wendy Parry

Lynn said:
Hi Wendy,
I'm not quite sure I understand what you want to do but let me take a stab
at it. Are you wanting to display 2 Tab pages for a student taking 2
subjects and 3 Tab pages for a student taking 3 subject, etc.? Would you
post the structure of your database?
Hi Lynn,
Yes that's correct.

Ok, the database structure is a little difficult as I have bolt on
tables to a linked OMNIS database, but the assessments are stored thus:

tblAcadGrade
pk FP_PU_Roll_No
pk Set Sequence
pk AsmtGrade_SEQ
AcadYear
FS_SET_Code
FS_Subject
FP_PU_Year
GP1-GP4
E1-E4
Autumn - these are the termly reports
Spring
Summer

Each student will have a record for each subject for each academic year,
3 reports are written each year, and I'm trying to display for example
all the Spring reports for each subject for one student in a multi page
tab control.

Let me know if you need anything further

Wendy
 
W

Wendy Parry

Lynn said:
Hi Wendy,
So are you trying to store all this information in a single table? If so,
I'm not sure you have an adequate database design to handle what you want to
do.
Yes. I've chosen to do it this way as each record is per academic year
and is related to the set that the child is attached to.

I know I could split this with:


Set Sequence
Autumn
Spring
Summer

But does it actually help? I'm still left with X tuples even using a
query - it's almost like needing a transpose function like Excel to
transform vertical data to horizontal data.

I don't want to expand out to too many tables, as there are over 30
tables already in the OMNIS schema.
 
W

Wendy Parry

Lynn said:
Then you might want to take a look at the Access Crosstab query, which does
the same thing as the Excel transpose function.
Already done that, it will build the query as a complete 1:1 - every
student takes every subject.....
 

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