Hi,
I want a form or report based on the results of a crosstab query which shows summary information as to which topics have been completed by all employees on system, in the following format:
ReferProc Topic john Smith Paul Edwards <--(headings, names added for all employees on system)
A this 11/10/01
B that 12/10/01 8/8/01
etc
The crosstab query is based on the following query that takes data from 3 tables:
qryIndForCrossTab:
SELECT tblSIndTrain.StaffID, tblStaffDetails.FName, tblStaffDetails.LName, ([FName] & " " & [Lname]) AS Name, tblIndTopics.Topic, tblIndTopics.ReferProc, tblSIndTrain.TopicDate
FROM tblStaffDetails INNER JOIN (tblIndTopics INNER JOIN tblSIndTrain ON tblIndTopics.INDID = tblSIndTrain.INDID) ON tblStaffDetails.StaffID = tblSIndTrain.StaffID;
the crosstab query it self is as follows:
qryIndCrossTab:
TRANSFORM First(qryIndForCrossTab.TopicDate) AS FirstOfTopicDate
SELECT qryIndForCrossTab.ReferProc, qryIndForCrossTab.Topic
FROM qryIndForCrossTab
GROUP BY qryIndForCrossTab.ReferProc, qryIndForCrossTab.Topic
PIVOT qryIndForCrossTab.Name;
The problem is that I can easily create a form based on the crosstab but when a new staff member is added to the system although the actual queries (both the crosstab and the query the crosstab is based on) will add the new staff members name and respective dates for each topic done the form originally created will not include a column heading field for the new employee.
So..is there a way to dynamically create a new field on the form in order to keep it upto date with new employees.
Post maybe a little confusing but please ask for clarification.
Any help would be appreciated.
Dan
I want a form or report based on the results of a crosstab query which shows summary information as to which topics have been completed by all employees on system, in the following format:
ReferProc Topic john Smith Paul Edwards <--(headings, names added for all employees on system)
A this 11/10/01
B that 12/10/01 8/8/01
etc
The crosstab query is based on the following query that takes data from 3 tables:
qryIndForCrossTab:
SELECT tblSIndTrain.StaffID, tblStaffDetails.FName, tblStaffDetails.LName, ([FName] & " " & [Lname]) AS Name, tblIndTopics.Topic, tblIndTopics.ReferProc, tblSIndTrain.TopicDate
FROM tblStaffDetails INNER JOIN (tblIndTopics INNER JOIN tblSIndTrain ON tblIndTopics.INDID = tblSIndTrain.INDID) ON tblStaffDetails.StaffID = tblSIndTrain.StaffID;
the crosstab query it self is as follows:
qryIndCrossTab:
TRANSFORM First(qryIndForCrossTab.TopicDate) AS FirstOfTopicDate
SELECT qryIndForCrossTab.ReferProc, qryIndForCrossTab.Topic
FROM qryIndForCrossTab
GROUP BY qryIndForCrossTab.ReferProc, qryIndForCrossTab.Topic
PIVOT qryIndForCrossTab.Name;
The problem is that I can easily create a form based on the crosstab but when a new staff member is added to the system although the actual queries (both the crosstab and the query the crosstab is based on) will add the new staff members name and respective dates for each topic done the form originally created will not include a column heading field for the new employee.
So..is there a way to dynamically create a new field on the form in order to keep it upto date with new employees.
Post maybe a little confusing but please ask for clarification.
Any help would be appreciated.
Dan