Please Please Help...I'm Going Insane!

Oct 1, 2004

Hi,

I am trying to code some reports in Access 2000, but I have a problem. Here is the situation - I have a form which is made up of two tabs. On one of the tabs, there is a subform. It is this subform which I would like to run my reports from. The idea is that the user selects a value from a drop down combo box and then clicks a button, at which point a report runs. The report needs to take the value from the combo box and use it in the query. I have written the following query which runs when the report loads. The problem I have is that it does not recognise the form control that is referred to. I know that doing this on a form rather than subform works fine, but this does not. Does anyone know of a work around, without me having to re-design my screens without subforms. Thanks!

SELECT LU_GPPractices.Practice, GP_Objectives.[Objective Num], GP_Actions.[Action Desc], GP_Actions.Timescale, GP_Actions.Status, LU_Objectives.[Key Resp], GP_Actions.[Completed Date]
FROM (GP_Objectives INNER JOIN (GP_Actions INNER JOIN LU_Objectives ON GP_Actions.[Objective Num] = LU_Objectives.[Objective Num]) ON (GP_Objectives.[Objective Num] = GP_Actions.[Objective Num]) AND (GP_Objectives.[Practice Code] = GP_Actions.[Practice Code])) INNER JOIN LU_GPPractices ON GP_Actions.[Practice Code] = LU_GPPractices.[Practice Code]
WHERE (((LU_Objectives.[Key Resp])=[Forms]![FrmTabMenu]![FrmSearch].[ComboKey]) AND ((GP_Actions.[Completed Date]) Is Null))
ORDER BY LU_GPPractices.Practice, GP_Objectives.[Objective Num], GP_Actions.Timescale;

View Replies


ADVERTISEMENT

Help, This Is Driving Me Insane!

Nov 9, 2005

My query looks like this...The problem is that when I have one Radio with two records where [Defect fixed?] is false it counts that as two separate radios instead of one. Somehow I need to make it sum records with the same Radio/Serial_number as one...Anyone have any suggestions?

SELECT DISTINCT Defect_Log.[Defect Fixed?], Defect_Log.Station, Part_Number_Log.Type
FROM Part_Number_Log INNER JOIN (Serial_Number_Log INNER JOIN Defect_Log ON Serial_Number_Log.Serial_Number = Defect_Log.Serial_Number) ON Part_Number_Log.[Part Number] = Serial_Number_Log.Part_Number
GROUP BY Defect_Log.[Defect Fixed?], Defect_Log.Station, Part_Number_Log.Type
HAVING (((Defect_Log.[Defect Fixed?])=False) AND ((Defect_Log.Station)="station 1") AND ((Part_Number_Log.Type)="vhf"));

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved