My first post. Hopefully someone can help
!
I have a continuous form that I want to filter with a command button which will prompt the user to select the complete field, or any portion of the field. For instance, if the field has the value W1725B, the user could select the whole thing to filter that value, or select W and all records with a W in the field will show.
When I use the Filter by Selection in the Menu, the above filtering selections work fine. However, when I try it using VBA, no matter how many characters I highlight, the form only filters the complete field.
What am I missing? I have tried both of the following in the VBA code, and the results are exactly the same:
Code:
Screen.PreviousControl.SetFocus
DoCmd.RunCommand acCmdFilterBySelection
Code:
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acCmdFilterBySelection, , acMenuVer70
I am using Access 2000 (yes 2000
) on Windows 7 64bit
Thanks in advance!