Results 1 to 5 of 5
  1. #1
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496

    Asking for a date gives me a date range (concatenate)

    DoCmd.OpenReport "rptTaxInvoicesCompany", acViewPreview, , "[TradingAsID]=" & Me.List0.Column(0) And "PaymentDateBanked1st = #" & Me.txtDateField & "#"



    I keep getting data mismatch, clicking on a main form's listbox opens the records but I have an unbound textbox with short date format to open what I click in that list by the date in the unbound textbox.

    data missmatch 13

    I'm doing something wrong not sure what

    P.s. not date range, incorrectly put in title

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    This kinda jumps out at me

    "PaymentDateBanked1st

  3. #3
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    I tried it with "[PaymentDateBanked1st]=" and I still had the same error - I ended up putting [forms]![frmTaxInvoicesCompany]![txtDateField]and it works... but yes I would prefer the vba method

    Click image for larger version. 

Name:	Capture.JPG 
Views:	8 
Size:	24.3 KB 
ID:	13902

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Hmm... thanks for posting the result

  5. #5
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by ItsMe View Post
    Hmm... thanks for posting the result
    I'm wondering if it has to do with having the "is not null" in the query, perhaps removing that and putting it in the vba code as another and?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 09-11-2013, 09:49 AM
  2. Replies: 1
    Last Post: 03-06-2013, 10:30 AM
  3. Replies: 3
    Last Post: 07-18-2012, 10:13 PM
  4. Date Range Report with Multiple Date Fields
    By StevenCV in forum Reports
    Replies: 13
    Last Post: 02-29-2012, 08:29 AM
  5. Date range help!!
    By bananatodd in forum Access
    Replies: 26
    Last Post: 10-18-2010, 01:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums