S
Sheila D
Hello - I have the following SQL code in my query:
SELECT T_Procedures.Consultant, Q_Procedure_Type_Strings.String,
T_Procedures.Date_Of_Procedure, T_Procedures.Length_Of_Procedure,
T_Patients.Surname, T_Patients.Forename,
[Forms]![ChooseF_Consultant_Procedure_Times]![Start Date] AS Expr1,
[Forms]![ChooseF_Consultant_Procedure_Times]![End Date] AS Expr2
FROM T_Patients INNER JOIN (T_Procedures INNER JOIN Q_Procedure_Type_Strings
ON T_Procedures.Procedure_Number = Q_Procedure_Type_Strings.Procedure_Number)
ON T_Patients.Hospital_Number = T_Procedures.Hospital_Number
WHERE
(((Q_Procedure_Type_Strings.String)=[Forms]![ChooseF_Consultant_Procedure_Times]![String] Or (Q_Procedure_Type_Strings.String) Is Null));
If I complete the form with a particular value I get the records I expect
but if I leave it blank I get nothing where I am expecting (or hoping for!!)
all the records. This normally works so I can't see what the problem is this
time, any ideas much appreciated
Sheila
SELECT T_Procedures.Consultant, Q_Procedure_Type_Strings.String,
T_Procedures.Date_Of_Procedure, T_Procedures.Length_Of_Procedure,
T_Patients.Surname, T_Patients.Forename,
[Forms]![ChooseF_Consultant_Procedure_Times]![Start Date] AS Expr1,
[Forms]![ChooseF_Consultant_Procedure_Times]![End Date] AS Expr2
FROM T_Patients INNER JOIN (T_Procedures INNER JOIN Q_Procedure_Type_Strings
ON T_Procedures.Procedure_Number = Q_Procedure_Type_Strings.Procedure_Number)
ON T_Patients.Hospital_Number = T_Procedures.Hospital_Number
WHERE
(((Q_Procedure_Type_Strings.String)=[Forms]![ChooseF_Consultant_Procedure_Times]![String] Or (Q_Procedure_Type_Strings.String) Is Null));
If I complete the form with a particular value I get the records I expect
but if I leave it blank I get nothing where I am expecting (or hoping for!!)
all the records. This normally works so I can't see what the problem is this
time, any ideas much appreciated
Sheila