From: Richard on
Yes that did work thanks to all

Richard

"John W. Vinson" wrote:

> On Tue, 16 Mar 2010 20:39:01 -0700, Richard
> <Richard(a)discussions.microsoft.com> wrote:
>
> >I changed the code to your suggestion but I now get a run-time error '2448'
> >"You can't assign a value to this object". Also the code breaks on the
> >following line:
> >
> >Me.Filter = stFilter
> >
> >Richard
> >
> >
> >"Mr. B" wrote:
> >
> >> You need to remove the Like and "*" from the equation
> >>
> >> stFilter = "[Phone] = " & Me.[txtPhoneNumber] & "'"
>
> Possibly Mr. B had a tiny typo, which might be causing this problem: there's a
> missing quotemark. Try
>
> stFilter = "[Phone] = '" & Me.[txtPhoneNumber] & "'"
>
> This will evaluate to
>
> [Phone] = '(222) 222-2222'
>
> which should work correctly as a filter string.
>
> I'm thinking this may be the case because your original LIKE filter string was
> (sort of) working....
> --
>
> John W. Vinson [MVP]
> .
>