Form Filter Issue

J

jneseth

I have a form that shows inventory, and some VBA in the background that gets
a partial part number, then applies that partial part number to a filter
leaving the expected result. This operates correctly using Access 2003, but
does not perform any filtering using access 2007. The code is below, please
any help??
Thanks!


answ1 = InputBox("Enter in the Part Number that you are looking for. If
uncertain of the complete number, just enter in the beginning portion. (eg..
Looking for part number12345678 but uncertain of the dash number, just put in
'12345678' and the results will show all items meeting the 12345678
criteria).", "Search for Part number")
Me.frm_LSO_change_quantity_sub1.Form.Filter = "[part_number] Like'" &
answ1 & "*'"
DoCmd.RunCommand acCmdApplyFilterSort
 
A

Allen Browne

John, try something like this:

Dim strWhere As String
With Me.frm_LSO_change_quantity_sub1.Form
strWhere = "[part_number] Like """ & answ1 & """*'"
'debug.print strWhere
.Filter = strWhere
.FilterOn = True
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top