doing? I have been troubleshooting this code because it WAS working last Friday and no longer is. I am not sure why. basically I have a text field on an access form called "txtsourcekeyword" the user can search for a particular MATERIAL_ID (CDW-01;text field)if he/she knows it or enter wildcard info CD*. The list box 'FormIndex' should then be filtered to show all the records with CD* and it is not doing that.
Any ideas? If I understand the code better maybe I can troubleshoot it better.
This is the code I have behind the command button to find the material_id.
Private Sub cmdViewSources_Click()
wherestring = vbNullString
If IsNull(txtSourceKeyword) Then
FormIndex.RowSource = "SELECT tbl_material_description.MATERIAL_ID, tbl_material_description.BUILDING_ID FROM tbl_material_description ORDER BY tbl_material_description.MATERIAL_ID;"
Else
strWildcard = txtSourceKeyword
wherestring = "WHERE(((tbl_material_description.MATERIAL_ID) like ""*" & strWildcard & "*""))"
FormIndex.RowSource = "SELECT tbl_material_description.MATERIAL_ID, tbl_material_description.BUILDING_ID FROM tbl_material_description ORDER BY tbl_material_description.MATERIAL_ID;"
End If
End Sub
thanks in advance!
Any ideas? If I understand the code better maybe I can troubleshoot it better.
This is the code I have behind the command button to find the material_id.
Private Sub cmdViewSources_Click()
wherestring = vbNullString
If IsNull(txtSourceKeyword) Then
FormIndex.RowSource = "SELECT tbl_material_description.MATERIAL_ID, tbl_material_description.BUILDING_ID FROM tbl_material_description ORDER BY tbl_material_description.MATERIAL_ID;"
Else
strWildcard = txtSourceKeyword
wherestring = "WHERE(((tbl_material_description.MATERIAL_ID) like ""*" & strWildcard & "*""))"
FormIndex.RowSource = "SELECT tbl_material_description.MATERIAL_ID, tbl_material_description.BUILDING_ID FROM tbl_material_description ORDER BY tbl_material_description.MATERIAL_ID;"
End If
End Sub
thanks in advance!