KeithG said:Are you talking about if you leave all criteria boxes blanking and trying to open the form?
KeithG said:Is this what you wanted?
CurrentDb.QueryDefs("Query1").SQL = "SELECT [Tooling Information].[NC Tool #], [Tooling Information].[NC Division], [Tooling Information].[Profile # or Name], [Tooling Information].[Profile Type], [Tooling Information].[Tool Type], [Tooling Information].Notes, [Tooling Information].[Tool Material], [Tooling Information].[Shank Diameter], [Tooling Information].[Minor Diameter], [Tooling Information].[Max Cut Depth], [Tooling Information].[Board Thickness], [Tooling Information].[Tool Description], [Tooling Information].[Tool used in Fergus Falls - Veneer], [Tooling Information].[Tool used in Corbin - Thermofoil], [Tooling Information].[Tool used in Vanceburg, KY - Veneer], [Tooling Information].[Tool used in Vanceburg, KY - Wood], [Tooling Information].[Tool used in Arkansas City, KS - Veneer], [Tooling Information].[Tool used in Fergus Falls - Thermofoil], [Tooling Information].[AutoCAD File], [Tooling Information].[PDF File] FROM [Tooling Information]"
CurrentDb.QueryDefs("Query1").Close
Private Sub ClearForm_Click()
Me.[cmbNCTool].Value = ""
Me.[cmbNCDivision].Value = ""
Me.[cmbToolMaterial].Value = ""
Me.[cmbProfile].Value = ""
Me.[cmbToolType].Value = ""
Me.[cmbProfileType].Value = ""
Me.[cmbBoardThick].Value = ""
Me.[cmbMinorD].Value = ""
Me.[cmbShankD].Value = ""
Me.[cmbMaxCut].Value = ""
Me.[txtNotes].Value = ""
Me.[txtDesc].Value = ""
Me.[chkUsedArksCtyVeneer].Value = ""
Me.[chkUsedCorbinFoil].Value = ""
Me.[chkUsedFFallsVeneer].Value = ""
Me.[chkUsedFFallsFoil].Value = ""
Me.[chkUsedVbrgVeneer].Value = ""
Me.[chkUsedVbrgWood].Value = ""
CurrentDb.QueryDefs("Query1").SQL = "SELECT [Tooling Information].[NC Tool #], [Tooling Information].[NC Division], [Tooling Information].[Profile # or Name], [Tooling Information].[Profile Type], [Tooling Information].[Tool Type], [Tooling Information].Notes, [Tooling Information].[Tool Material], [Tooling Information].[Shank Diameter], [Tooling Information].[Minor Diameter], [Tooling Information].[Max Cut Depth], [Tooling Information].[Board Thickness], [Tooling Information].[Tool Description], [Tooling Information].[Tool used in Fergus Falls - Veneer], [Tooling Information].[Tool used in Corbin - Thermofoil], [Tooling Information].[Tool used in Vanceburg, KY - Veneer], [Tooling Information].[Tool used in Vanceburg, KY - Wood], [Tooling Information].[Tool used in Arkansas City, KS - Veneer], [Tooling Information].[Tool used in Fergus Falls - Thermofoil], [Tooling Information].[AutoCAD File], [Tooling Information].[PDF File] FROM [Tooling Information]"
CurrentDb.QueryDefs("Query1").Close
End Sub
KeithG said:Sorry, I forgot I did one other thing. If you notice in the code for your view button each combo box is checked to see if the box is not null and Len>1. Because when you hit the cancel button you are assigning a zero length string to the comboboxes so they won't be null.