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

x
?
Solved

Where condition, datatype mismatch error.

Posted on 2013-12-24
3
Medium Priority
?
349 Views
Last Modified: 2013-12-24
Experts, I get a data type mismatch in the below.  I am sure it is something to do with either the # or the double quote.  

Private Sub cmdOpenRpt_Click()

    Dim strCriteria As String
    
    strCriteria = "([End User] Like '" & Me.[txtClient] & "*' Or [End User] Is Null) AND " _
                       & "[EntryDate]>=#" & Me.[txtdatefrom] & "# And " _
                       & "[EntryDate]<#" & Me.[txtDateTo] + 1 & "# And " _
                       & "[EntryDate] Is Not Null" And "" _
                       & "[SentForSign]>=#" & Me.[txtdatefrom] & "# Or " _
                       & "[SignedDate]>=#" & Me.[txtdatefrom] & "#"
                       
    DoCmd.OpenReport "rptDepartures_other", acViewReport, strCriteria

Open in new window



End Sub
0
Comment
Question by:pdvsa
[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
3 Comments
 

Author Comment

by:pdvsa
ID: 39738511
I think it has something to do with line 8.  
There are 2 double quotes and Access put the extra one there after I delete it.  
There could be something else but I think the error is between line 8 and 10
0
 
LVL 10

Accepted Solution

by:
Korbus earned 2000 total points
ID: 39738524
shouldn't line 8 have only 2 doube quotes total?  You mentioned access added ONE, but I see two extra in your code.

>>  & "[EntryDate] Is Not Null And " _
0
 

Author Closing Comment

by:pdvsa
ID: 39738551
thank you.  that was it.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

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