<picky>
If the name of the person includes an apostrophe (D'Arcy, O'Brien, etc.),
using a single quote will fail.
You need to use
Filter Name: ="[NameofPerson]=""" & [NameofPerson1] & """"
(that's three double quotes in a row before the first ampersand, and four
quotes in a row after the second one).
Of course, that will fail in the (granted, unlikely) event that there are
double quotes in the name (think nicknames...), in which case you need
something like
Filter Name: ="[NameofPerson]='" & Replace([NameofPerson1], "'", "''") & "'"
Exagerated for clarity, that's
Filter Name: ="[NameofPerson]= ' " & Replace([NameofPerson1], " ' ", " ' '
") & " ' "
</picky>
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Jeanette Cunningham" <(E-Mail Removed)> wrote in message
news:%23V%23XNY%(E-Mail Removed)...
> Hi Bill,
> If NameofPerson1 is a text field you will need a different syntax, like
> this
> Filter Name: ="[NameofPerson]='" & [NameofPerson1]& "'"
>
> expanding the quotes to make it easier to read, we get
> ' " & [NameofPerson1]& " ' "
>
> Other things to check:
> Check the spelling is correct for form and field names.
> Check that NameofPerson1 is correct for the combo.
> I mean that if the combo has more than 1 column, make sure you are using
> the correct column in the filter name.
>
>
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>
>
> "Bill" <(E-Mail Removed)> wrote in message
> news:FFF8258B-B4D7-4F24-9B28-(E-Mail Removed)...
>>I have a combo box which I use to grab a list of names. I wanted to
>>create a
>> button that would allow me to edit the name choosen should it be
>> necessary.
>>
>> So I created my button and wrote a simple macro... Well it doesn't want
>> to
>> work for me. Heres the macro:
>>
>> Action: OpenForm
>> Form Name: FRM_TM_Information
>> View: Form
>> Filter Name: ="[NameofPerson]=" & [NameofPerson1]
>> Data Mode:
>> Window Mode: Normal
>>
>> Any help is always appreciated! Thanks
>> Where condition:
>
>