From: BruceM via AccessMonster.com on
Quote marks are different for a text field. If ClientID is text you need to
use:

rs.FindFirst "[ClientID] = ' " & Me.cboClient & " ' "

This assumes the bound column of cboClient is ClientID.

If ClientID (or any text field) is in an expression such as the above, and
records may contain an apostrophe (e.g. Joe's Garage) you need a different
approach to the quotes:

rs.FindFirst "[ClientID] = " " " & Me.cboClient & " " " "

I added spaces between the quotes for clarity. If you add spaces the VBA
editor will get rid of them.


KAquestions wrote:
>Hi Bruce,
>
>Thanks very much for your response. I have done all that, but keep getting
>the following error message
>
>"Run Time Error 3464 : Data type mismatch in criteria expression"
>
>I don't know where i should be looking to fix this. [ClientID] is a PK
>field, which is Text - it's basically an ID number, but NOT autogenerated.
>Will this be something to do with it?
>
>Also, when i click debug, the line highlighted is:
>
>rs.FindFirst "[ClientID] = " & Me.cboClient
>
>Any further help would be much appreciated,
>
>Kirst
>
>> I'm guessing you have After Update combo box code along the lines of:
>>
>[quoted text clipped - 68 lines]
>>>
>>>Kirst

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1

From: KAquestions on
Have tried both!

Now i have no error messages, but no matter what i pick the same record
comes up - the first one in the query?

Kirst

"BruceM via AccessMonster.com" <u54429(a)uwe> wrote in message
news:a7fdd05e5dc44(a)uwe...
> Quote marks are different for a text field. If ClientID is text you need
> to
> use:
>
> rs.FindFirst "[ClientID] = ' " & Me.cboClient & " ' "
>
> This assumes the bound column of cboClient is ClientID.
>
> If ClientID (or any text field) is in an expression such as the above, and
> records may contain an apostrophe (e.g. Joe's Garage) you need a different
> approach to the quotes:
>
> rs.FindFirst "[ClientID] = " " " & Me.cboClient & " " " "
>
> I added spaces between the quotes for clarity. If you add spaces the VBA
> editor will get rid of them.
>
>
> KAquestions wrote:
>>Hi Bruce,
>>
>>Thanks very much for your response. I have done all that, but keep getting
>>the following error message
>>
>>"Run Time Error 3464 : Data type mismatch in criteria expression"
>>
>>I don't know where i should be looking to fix this. [ClientID] is a PK
>>field, which is Text - it's basically an ID number, but NOT autogenerated.
>>Will this be something to do with it?
>>
>>Also, when i click debug, the line highlighted is:
>>
>>rs.FindFirst "[ClientID] = " & Me.cboClient
>>
>>Any further help would be much appreciated,
>>
>>Kirst
>>
>>> I'm guessing you have After Update combo box code along the lines of:
>>>
>>[quoted text clipped - 68 lines]
>>>>
>>>>Kirst
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1
>


From: KAquestions on
I have done it again and got it working, I must have had a typo :)

I really appreciate all your help, thanks,

Kirst

"KAquestions" <kirstieadam(a)yahoo.com_(no_spam)> wrote in message
news:OvPrxf28KHA.3840(a)TK2MSFTNGP02.phx.gbl...
> Have tried both!
>
> Now i have no error messages, but no matter what i pick the same record
> comes up - the first one in the query?
>
> Kirst
>
> "BruceM via AccessMonster.com" <u54429(a)uwe> wrote in message
> news:a7fdd05e5dc44(a)uwe...
>> Quote marks are different for a text field. If ClientID is text you need
>> to
>> use:
>>
>> rs.FindFirst "[ClientID] = ' " & Me.cboClient & " ' "
>>
>> This assumes the bound column of cboClient is ClientID.
>>
>> If ClientID (or any text field) is in an expression such as the above,
>> and
>> records may contain an apostrophe (e.g. Joe's Garage) you need a
>> different
>> approach to the quotes:
>>
>> rs.FindFirst "[ClientID] = " " " & Me.cboClient & " " " "
>>
>> I added spaces between the quotes for clarity. If you add spaces the VBA
>> editor will get rid of them.
>>
>>
>> KAquestions wrote:
>>>Hi Bruce,
>>>
>>>Thanks very much for your response. I have done all that, but keep
>>>getting
>>>the following error message
>>>
>>>"Run Time Error 3464 : Data type mismatch in criteria expression"
>>>
>>>I don't know where i should be looking to fix this. [ClientID] is a PK
>>>field, which is Text - it's basically an ID number, but NOT
>>>autogenerated.
>>>Will this be something to do with it?
>>>
>>>Also, when i click debug, the line highlighted is:
>>>
>>>rs.FindFirst "[ClientID] = " & Me.cboClient
>>>
>>>Any further help would be much appreciated,
>>>
>>>Kirst
>>>
>>>> I'm guessing you have After Update combo box code along the lines of:
>>>>
>>>[quoted text clipped - 68 lines]
>>>>>
>>>>>Kirst
>>
>> --
>> Message posted via AccessMonster.com
>> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1
>>
>
>