Solved

Open form using Like and LEFT

Posted on 2014-03-14
2
321 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

861 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

23 Experts available now in Live!

Get 1:1 Help Now