Thanks Ralph...
The sCrit did yield what I said it did...but, you gave me the answer by
telling me that I did not need the beginning and ending chr(34).
It works...
Thanks for your help
I really appreciate it.
JP
--
Thanks in advance for any assistance you can give me...
JP
"ralph" wrote:
> On Mon, 12 Jul 2010 10:32:57 -0700, JP...
> <JP@discussions.microsoft.com> wrote:
>
> >Hi... I'm using VB6.0 in a Windows XP environment with Microsoft Access 2000
> >databases.
> >
> >I have a datagrid on my form attached to and adodc data control. I load the
> >data control with data from my Access 2000 table. One column is "[Rider
> >Name]". I want to do a find on the "Patient" (or [Rider Name]).
> >
> >In a combo box on the form, I select a patient name.
> >
> >When the focus is lost on the combo box, it goes to the "Lost Focus" event
> >where:
> >
> >I define a variable as sCrit for my criteria
> >I give the criteria the following string:
> >
> >Chr4(34) & "[Rider Name] = " & chr$(39) & Me.cmbPatient.text & Chr$(39) &
> >Chr$(34).
> >
> >That should yield "[Rider Name] = 'CARSON, ROBERT J'"
> >
>
> The only thing that seems worrisome is that "... should yield ..."
> part.
> Use a Debug.Print statement and make sure.
>
> >I say:
> >me.datGrddata.recordset.find sCrit.
> >
>
> Also how are you assigning that string to sCrit? The beginning and
> terminating Chr$(34)s shouldn't be needed.
>
> -ralph
> .
>