D
ddunkel
Hello,
I am a little stuck with this query. I am trying to create a query in
MS access that looks at the values in a created form an pulls like
matches out of a table. Now when all of the boxes in the form are
filled in this works great I would like to have the user leave the
field blank and have it just pull all results (Or ignore this field).
This would give the user the ability to refine their search.
I have done this same SQL in our AS400 against a different file and it
works fine but My issue is in MS access I cannot use the VALUE
function and that is the change I made in our AS400 to get it to
work.
Here is the SQL
SELECT tbl_Guides.[Item number], tbl_Guides.[Current unit cost],
tbl_Guides.MATERIAL, tbl_Guides.OVERHEAD, tbl_Guides.LABOR,
(tbl_Guides.[GR Method]=FORMS.frm_guide.GRbox), tbl_Guides.[Bore
Diameter], tbl_Guides.[Rod Diameter], tbl_Guides.[Length Of Guide],
tbl_Guides.[Lot Size], tbl_Guides.[Type Of Material], tbl_Guides.EAU,
tbl_Guides.[Tapped Holes], tbl_Guides.[Wear Ring],
tbl_Guides.Standard, tbl_Guides.[AN Wiper] INTO tbl_Master_Guides
FROM tbl_Guides
WHERE (tbl_Guides.[GR Method]=FORMS.frm_guide.GRbox) AND ((tbl_Guides.
[Bore Diameter])=(FORMS.frm_guide.borebox)) And ((tbl_Guides.[Rod
Diameter])= FORMS.frm_guide.RodBox) And ((tbl_Guides.[Length Of
Guide]) = FORMS.frm_Guide.LengthBox) And ((tbl_ .[Lot Size]) =
FORMS.frm_Guide.LotBox) And ((tbl_Guides.[Type Of Material]) =
FORMS.frm_Guide.MaterialBox) And ((tbl_Guides.EAU) =
FORMS.frm_Guide.UsageBox) And ((tbl_Guides.[Tapped Holes]) =
FORMS.frm_Guide.tappedBox)
GROUP BY tbl_Guides.[Item number], tbl_Guides.[Current unit cost],
tbl_Guides.MATERIAL, tbl_Guides.OVERHEAD, tbl_Guides.LABOR, tbl_Guides.
[GR Method], tbl_Guides.[Bore Diameter], tbl_Guides.[Rod Diameter],
tbl_Guides.[Length Of Guide], tbl_Guides.[Lot Size], tbl_Guides.[Type
Of Material], tbl_Guides.EAU, tbl_Guides.[Tapped Holes], tbl_Guides.
[Wear Ring], tbl_Guides.Standard, tbl_Guides.[AN Wiper];
I am a little stuck with this query. I am trying to create a query in
MS access that looks at the values in a created form an pulls like
matches out of a table. Now when all of the boxes in the form are
filled in this works great I would like to have the user leave the
field blank and have it just pull all results (Or ignore this field).
This would give the user the ability to refine their search.
I have done this same SQL in our AS400 against a different file and it
works fine but My issue is in MS access I cannot use the VALUE
function and that is the change I made in our AS400 to get it to
work.
Here is the SQL
SELECT tbl_Guides.[Item number], tbl_Guides.[Current unit cost],
tbl_Guides.MATERIAL, tbl_Guides.OVERHEAD, tbl_Guides.LABOR,
(tbl_Guides.[GR Method]=FORMS.frm_guide.GRbox), tbl_Guides.[Bore
Diameter], tbl_Guides.[Rod Diameter], tbl_Guides.[Length Of Guide],
tbl_Guides.[Lot Size], tbl_Guides.[Type Of Material], tbl_Guides.EAU,
tbl_Guides.[Tapped Holes], tbl_Guides.[Wear Ring],
tbl_Guides.Standard, tbl_Guides.[AN Wiper] INTO tbl_Master_Guides
FROM tbl_Guides
WHERE (tbl_Guides.[GR Method]=FORMS.frm_guide.GRbox) AND ((tbl_Guides.
[Bore Diameter])=(FORMS.frm_guide.borebox)) And ((tbl_Guides.[Rod
Diameter])= FORMS.frm_guide.RodBox) And ((tbl_Guides.[Length Of
Guide]) = FORMS.frm_Guide.LengthBox) And ((tbl_ .[Lot Size]) =
FORMS.frm_Guide.LotBox) And ((tbl_Guides.[Type Of Material]) =
FORMS.frm_Guide.MaterialBox) And ((tbl_Guides.EAU) =
FORMS.frm_Guide.UsageBox) And ((tbl_Guides.[Tapped Holes]) =
FORMS.frm_Guide.tappedBox)
GROUP BY tbl_Guides.[Item number], tbl_Guides.[Current unit cost],
tbl_Guides.MATERIAL, tbl_Guides.OVERHEAD, tbl_Guides.LABOR, tbl_Guides.
[GR Method], tbl_Guides.[Bore Diameter], tbl_Guides.[Rod Diameter],
tbl_Guides.[Length Of Guide], tbl_Guides.[Lot Size], tbl_Guides.[Type
Of Material], tbl_Guides.EAU, tbl_Guides.[Tapped Holes], tbl_Guides.
[Wear Ring], tbl_Guides.Standard, tbl_Guides.[AN Wiper];