subform question

  • Thread starter Thread starter Bri
  • Start date Start date
B

Bri

Hello
I have a form listing personal info (address, dob, etc) for students. The
frm contains a subform that lists all of the courses the student takes by
name and by semester. (there is another tbl that gives the beginning date
and the ending date of each semester). The subfrm looks like this:

Algebra 340 Summer
Physics 300 Summer
Physics 301 Fall
Calculus 322 Fall
Algebra 344 Fall
Calculus 323 Winter

Mistakes are being made by office staff who read the wrong row from the
subform. Is there a way to:

a) color code the CURRENTLY RUNNING semester (Today, for eg, the Fall
semester courses could be red))
b) position the first currently running course (Physics 301 Fall) at
the TOP of the selections shown?

The other, non-current courses must still be shown on the subform, so I
can't just filter them out.

Thank you for any help.
 
Bri,

You can add the SemesterDates table to the query that the subform is
based on, joined to the existing table on the Semester field from
both. Then, you can make a calculated field in your query something
like this (using your own actual field names etc, of course)...
FirstSort: IIf(Date() Between [SemesterStart] and [SemesterEnd],0,1)
.... and use this as the basis of the sorting of the subform records.
You can also use Conditional Formatting, based on the value of this
field, to change the colour for the current semester.

- Steve Schapel, Microsoft Access MVP
 
Back
Top