Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Search combo error "Data Type Mismatch in Criteria Expression"

Posted on 2016-11-07
2
Medium Priority
?
145 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

Accepted Solution

by:
Ryan Chong earned 2000 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 27

Author Closing Comment

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

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

721 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