Solved

Search combo error "Data Type Mismatch in Criteria Expression"

Posted on 2016-11-07
2
61 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 50

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 25

Author Closing Comment

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

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Read about achieving the basic levels of HRIS security in the workplace.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

770 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