Solved

Where condition, datatype mismatch error.

Posted on 2013-12-24
3
340 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
  • 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 500 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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 different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

705 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

19 Experts available now in Live!

Get 1:1 Help Now