Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Open form using Like and LEFT

Posted on 2014-03-14
2
Medium Priority
?
338 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 27

Accepted Solution

by:
Shaun Kline earned 1400 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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.
Suggested Courses

971 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