Solved

Search combo error "Data Type Mismatch in Criteria Expression"

Posted on 2016-11-07
2
35 Views
Last Modified: 2016-11-07
I have a combo to search for records with filter on. I am getting the below erro
Search combo error "Data Type Mismatch in Criteria Expression"
Below is the code used
If IsNull(customer_search_combo) Then
Me.FilterOn = False
Else
'Me.Filter = "cust_nameCB = '" & Me.customer_search_combo & "'"
Me.Filter = "customer_name = " & Me.customer_search_combo
Me.FilterOn = True
End If

Can someone help
0
Comment
Question by:-MAS
2 Comments
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 500 total points
ID: 41878221
try change:
Me.Filter = "cust_nameCB = '" & Me.customer_search_combo & "'"

Open in new window

to:
Me.Filter = "cust_nameCB = " & Me.customer_search_combo

Open in new window

instead?
0
 
LVL 24

Author Closing Comment

by:-MAS
ID: 41878223
Thanks a lot. It worked
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now