Solved

Open form using Like and LEFT

Posted on 2014-03-14
2
320 Views
Last Modified: 2014-03-14
Experts, I am trying to open a form with 2 LiKE conditions.  I am getting a datatype mismatch error.  I only get this error after adding the second like condtion.  If I leave as only 1 LIKE condition then it works.  

DoCmd.OpenForm "Project Datasheet subform_3", acFormDS, , "[End User] Like '" & Left(Me.txtEndUser, 4) & "*'" Or "[UltimateEndUser] Like '" & Left(Me.txtEndUser, 4) & "*'", , acDialog

thank you
0
Comment
Question by:pdvsa
2 Comments
 
LVL 26

Accepted Solution

by:
Shaun Kline earned 350 total points
ID: 39930162
Try this

"[End User] Like '" & Left(Me.txtEndUser, 4) & "*' Or [UltimateEndUser] Like '" & Left(Me.txtEndUser, 4) & "*'",
0
 

Author Closing Comment

by:pdvsa
ID: 39930205
Perfect.  I see I  had an extra double quote.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

746 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

14 Experts available now in Live!

Get 1:1 Help Now