Private Sub cmdSearch_Click()
If IsNull(txtItem) Then
DoCmd.OpenTable "tblItemDetail"
Else
Dim strSQL As String
strSQL = "SELECT * " & _
"INTO tblResults " & _
"FROM tblItemDetail " & _
"WHERE Item# = '" & txtItemNumber & "'"
DoCmd.RunSQL
DoCmd.OpenTable "tblResults"
strSQL = vbNullString
End If
End Sub