> Yup! Would that affect whether it ought to be a string or a variant?
>
> I will include an If Null option, but I didn't think that could affect a
> type mismatch error?
>
> Interesting.
>
> "Jeff Boyce" wrote:
>
>> Tal
>>
>> Is there a chance your underlying table contains Nulls in that field?
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Office/Access MVP
>>
>> "Tal" <Tal[ at ]discussions.microsoft.com> wrote in message
>> news:0C0104F5-B934-4A1F-AE9C-F9AE2150D338[ at ]microsoft.com...
>> > For anyone still following this thread.
>> > I changed the String to a Variant and it worked.
>> > Does this make sense?
>> > Tal
>> >
>> > "Tal" wrote:
>> >
>> >> Hi Douglas,
>> >>
>> >> I keep removing the spaces and it keeps putting them back in
>> >> automatically,
>> >> with the type mismatch error.
>> >> I am very much a newbie, so very explicit advise is very very useful.
>> >>
>> >> Thanks,
>> >> Tal
>> >>
>> >> "Douglas J. Steele" wrote:
>> >>
>> >> > "Mike Painter" <mddotpainter[ at ]sbcglobal.net> wrote in message
>> >> > news:NTh%k.9080$x%.4363[ at ]nlpi070.nbdc.sbc.com...
>> >> > > Tal wrote:
>> >> > >> Hi all,
>> >> > >>
>> >> > >> I am trying to search a query where the field is actual an
>> >> > >> expression
>> >> > >> comprised of a subquery.
>> >> > >> I am getting a type mismatch error. Here is the code:
>> >> > >>
>> >> > >> strWhere = "([expClientMainName] LIKE "" * " & Me.txtClientSearch
>> >> > >> &
>> >> > >> "" * ")"
>> >> > >>
>> >> > > strWhere = "([expClientMainName] LIKE "" * " & Me.txtClientSearch
>> >> > > &
>> >> > > "*
>> >> > > "")"
>> >> > >
>> >> > > Should do it. (I usually use single quote double quote)
>> >> > > You can always run the string through a msgbox and see where the
>> >> > > quotes
>> >> > > fall.
>> >> >
>> >> > Of course, the spaces around the asterisks shouldn't be there.
>> >> >
>> >> > --
>> >> > Doug Steele, Microsoft Access MVP
>> >> >
http://I.Am/DougSteele>> >> > (no private e-mails, please)
>> >> >
>> >> >
>> >> >
>> >> >
>>
>>
>>