Access 2000 - Select query question

  • Thread starter Thread starter Abay
  • Start date Start date
A

Abay

Hello .. I have a parameter query, which asks for the Initials of a
Technician which works fine, but I would like to be able to select all
records if no Initials are entered. Is there a way to do this in the same
query. My code is:

SELECT Cldetail.Job_date, Cldetail.Notes, Cldetail.Wo_no, Cldetail.Wo_back,
Cldetail.Tech_init, Cldetail.Cname, Cldetail.Tech_hrs,
Cldetail.Wo_return_date, Tech.Tech_name
FROM Cldetail INNER JOIN Tech ON Cldetail.Tech_init = Tech.Tech_init
WHERE (((Cldetail.Wo_no)>"A*") AND ((Cldetail.Wo_back)=False) AND
((Cldetail.Tech_init)<>"CN" And (Cldetail.Tech_init)<>"3P") AND
((Cldetail.Tech_init)=[Enter Tech Initials]));

Note: I searched for posts on this, with no luck & any help would be much
appreciated

Thanks in advance,
Abay
 
Abay said:
Hello .. I have a parameter query, which asks for the Initials of a
Technician which works fine, but I would like to be able to select all
records if no Initials are entered. Is there a way to do this in the same
query. My code is:

SELECT Cldetail.Job_date, Cldetail.Notes, Cldetail.Wo_no, Cldetail.Wo_back,
Cldetail.Tech_init, Cldetail.Cname, Cldetail.Tech_hrs,
Cldetail.Wo_return_date, Tech.Tech_name
FROM Cldetail INNER JOIN Tech ON Cldetail.Tech_init = Tech.Tech_init
WHERE (((Cldetail.Wo_no)>"A*") AND ((Cldetail.Wo_back)=False) AND
((Cldetail.Tech_init)<>"CN" And (Cldetail.Tech_init)<>"3P") AND
((Cldetail.Tech_init)=[Enter Tech Initials]));


((Cldetail.Tech_init)=[Enter Tech Initials]) OR [Enter Tech
Initials] Is Null)
 
Many thanks Marsh, worked like a charm, your help is much appreciated.

Abay

Marshall Barton said:
Abay said:
Hello .. I have a parameter query, which asks for the Initials of a
Technician which works fine, but I would like to be able to select all
records if no Initials are entered. Is there a way to do this in the same
query. My code is:

SELECT Cldetail.Job_date, Cldetail.Notes, Cldetail.Wo_no,
Cldetail.Wo_back,
Cldetail.Tech_init, Cldetail.Cname, Cldetail.Tech_hrs,
Cldetail.Wo_return_date, Tech.Tech_name
FROM Cldetail INNER JOIN Tech ON Cldetail.Tech_init = Tech.Tech_init
WHERE (((Cldetail.Wo_no)>"A*") AND ((Cldetail.Wo_back)=False) AND
((Cldetail.Tech_init)<>"CN" And (Cldetail.Tech_init)<>"3P") AND
((Cldetail.Tech_init)=[Enter Tech Initials]));


((Cldetail.Tech_init)=[Enter Tech Initials]) OR [Enter Tech
Initials] Is Null)
 
Back
Top