Crosstab a schedule

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Happy Holidays! I have a table [tblPersonnelExceptions]
with the following fields: [EmplNbr][Exception][BeginDate]
[EndDate].
An exception is a reason why someone isn't available to
work (holiday, sick, school, jury duty...)

I need a crosstab query with the date across the top and
employee numbers on the left. The problem I am having is
that I have a beginning and ending date but obviously
need to reflect in the schedule the days in between as
unavailable.

I'm not very good at VBA yet but am actively working on
my education (College, Books...) anyway, I'm just not
there yet and really appreciate your help.

Thanks
 
You can create a table (tblDates) with all possible unique dates in a single
field [TheDate]. Add this table to your crosstab (no joins) and set the
criteria under the [TheDate] field to
Between [BeginDate] and [EndDate]
This will create one record for each exception, employee, and date
combination.
Set your column headings to the [TheDate] field.

I would probably use relative dates as column headings rather than actual
dates. You can search google groups on my name and relative dates to find
some examples.
 
Back
Top