LDMueller wrote:
[Quoted Text] >I have Access 2003. I have a form with a Find Command button. When the >user clicks on the Find button I need it to prompt for the file number. >Then, when the enter a number like 5666533c it should filter for all records >like US5666533c (e.g. *5666533c). Below is my code. The results now finds >the exact number, but it's not filtered and I can scroll to other numbers. >
Try using the Filter property instead:
Dim strFindID As String
strFindID = (InputBox("File Number?")) If strFindID <> vbNullString Then Me.Filter = "PatPubForNo Like ""*" & strFindID & """" Me.FilterOn = True Else Msgbox ... End If -- Marsh MVP [MS Access]
|