Run-time error '3464': data type mismatch in criteria expression

I am working on updating and improving an old database and changing the table structure, etc.  The data imported well into the new table, but now I want to add the proper "relations" back to the data.  I'm trying to lookup text found in one table in a second table (better said a recordset?) that is also a text field.   I'm getting a data type mismatch error.
    Dim Customers_rst As DAO.Recordset
    Dim ZIP_rst As DAO.Recordset
    Set Customers_rst = CurrentDb.OpenRecordset("Customers", dbOpenDynaset)
    Set ZIP_rst = CurrentDb.OpenRecordset("tblZIPCodes")
        Let strZipToActOn = ZIP_rst.Fields!ZIP
        strSearchData = strZipToActOn
        Customers_rst.FindFirst "CustPostalCode = " & strSearchData
Is there an obvious problem here?
How many points should be assigned to a question like this?
DrftrBobAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mbizupCommented:
Try this:

    Dim Customers_rst As DAO.Recordset
    Dim ZIP_rst As DAO.Recordset
    Set Customers_rst = CurrentDb.OpenRecordset("Customers", dbOpenDynaset)
    Set ZIP_rst = CurrentDb.OpenRecordset("tblZIPCodes")
         strZipToActOn = ZIP_rst.Fields!ZIP
        strSearchData = strZipToActOn
        Customers_rst.FindFirst "CustPostalCode = '" & strSearchData & "'"

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jerryb30Commented:
Maybe:
Customers_rst.FindFirst "CustPostalCode = '" & strSearchData & "'"
0
Jeffrey CoachmanMIS LiasonCommented:
<How many points should be assigned to a question like this? >
Assign points based on the urgency, or perceived difficulty...

Most experts here don't even look at points, they simple answer questions that interest them...
(as you can see here,  you have 3 Experts here within 10 minutes of posting your Q...)

;-)

jeffCoachman
0
DrftrBobAuthor Commented:
Thank you.  That answer crossed my mind, but not enough to try it.  I made a new variable for "CustPostalCode = " & strSearchData and it seemed to be quoted properly, so I went back to my original.

I tried crediting both answers, but was unable to figure how (very new here).
0
DrftrBobAuthor Commented:
I did that.  Maybe I did split the points.  It seemed to show only the one as the accepted solution.  Thanks for your attention.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.