Filter by form help Access 200s -vs- 2007

J

jneseth

I currently have some forms that I filter on certain fields using the
following code

If frm_LSO_change_quantity_flag1 < 5 Then
frm_LSO_change_quantity_flag1 = 10
answ1 = InputBox("Enter in the Part Number that you are looking for...",
"Search for Part number")
Me.frm_LSO_change_quantity_sub1.Form.Filter = "[honeywell_part_number]
Like'" & answ1 & "*'"
DoCmd.RunCommand acCmdApplyFilterSort
Me.Command68.Caption = "View All"
Exit Sub
End If

Problem is when running Access 2007, it does not like the use of the 'Like'
operator in the filter by form portion (I assume so because it does not work
in 2007).

Is there another set of code needed for access 2007, and if so what wouold
be used, in addition what is the environmental variable to look at to see
what version of access is running?

You r help is greatly appreceated!
 

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