Hi
I have a report with an underlying query. The criteria in the query points to three different controls on a form. The user has to select client name, start date and end date. I want to be able to let the user select just the client name, and not the start and end dates, then run the report, as well as selecting client name, start and end date. Is this possible?
Regards Phill
I have a report with an underlying query. The criteria in the query points to three different controls on a form. The user has to select client name, start date and end date. I want to be able to let the user select just the client name, and not the start and end dates, then run the report, as well as selecting client name, start and end date. Is this possible?
Regards Phill
Code:
SELECT T_ClientDetails.ClientID AS T_ClientDetails_ClientID, T_ActiveSession.SessionID, T_ActiveSession.ClientID AS T_Session_ClientID, T_ClientDetails.FirstName, T_ClientDetails.LastName, T_ClientDetails.Title, T_ClientDetails.OrganizationName, T_ActiveSession.ProjID, T_ArtistProj.ProjBandName, T_Studio.StudioName, T_Studio.StudioDesc, T_ActiveSession.StartDate, T_ActiveSession.EndDate, T_ActiveSession.StartTime, T_ActiveSession.EndTime, T_SessRate.Rate, T_ActiveSession.SessComplete, DateDiff("n",[starttime],[endtime]) AS DateDiffEXP, [datediffexp]\60 & Format([datediffexp] Mod 60,"\:00") AS DateDiffFormatExp, [Rate]/60*[datediffexp] AS TotalExVATExp, Round([vatvalue]/100*[TotalExVATExp],2) AS VATExpr, [TotalExVATExp]+[VATExpr] AS TotalIncVATExpr, T_VATValue.VATValue, T_ArtistProj.ProjectDesc
FROM T_VATValue, T_ClientDetails INNER JOIN (T_Studio INNER JOIN (T_SessRate INNER JOIN (T_ArtistProj INNER JOIN T_ActiveSession ON T_ArtistProj.ProjBandID = T_ActiveSession.ProjID) ON T_SessRate.SessRateID = T_ActiveSession.SessRateID) ON T_Studio.StudioID = T_ActiveSession.StudioID) ON T_ClientDetails.ClientID = T_ActiveSession.ClientID
GROUP BY T_ClientDetails.ClientID, T_ActiveSession.SessionID, T_ActiveSession.ClientID, T_ClientDetails.FirstName, T_ClientDetails.LastName, T_ClientDetails.Title, T_ClientDetails.OrganizationName, T_ActiveSession.ProjID, T_ArtistProj.ProjBandName, T_Studio.StudioName, T_Studio.StudioDesc, T_ActiveSession.StartDate, T_ActiveSession.EndDate, T_ActiveSession.StartTime, T_ActiveSession.EndTime, T_SessRate.Rate, T_ActiveSession.SessComplete, T_VATValue.VATValue, T_ArtistProj.ProjectDesc
HAVING (((T_ClientDetails.ClientID) Like [Forms]![F_ClientSessDRange].[combo7]) AND ((T_ActiveSession.StartDate)>=[forms]![f_ClientSessDrange]![BeginDate] And (T_ActiveSession.StartDate)<=[forms]![f_ClientSessDrange]![EndDate]) AND ((T_ActiveSession.SessComplete)=True));
Comment