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

x
?
Solved

Where condition, datatype mismatch error.

Posted on 2013-12-24
3
Medium Priority
?
352 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 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
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…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

916 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