Results 1 to 3 of 3
  1. #1
    George is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Feb 2012
    Posts
    295

    matching date Values

    Good Day all,

    by pressing a button on a form, I want to load a mainform with its subform given the following statement:



    Code:
    doCmd.OpenForm "frmSigninSupervisor", acNormal, , "DateValue(tblSignin.[DateCreated])=# " & Me.Text56 & "#"
    but an error message pops up as follow: Data type mismatched in criteria expression.


    However pressing another button on another form in a similar situation works fine. Here is the code:

    Code:
    DoCmd.OpenReport "tblsignin", acViewReport, , "Datevalue([Auto Date]) =# " & Me.Text6 & "#"

    These codes looks similar so I would be very grateful if anyone can explain the reason for the error message and show how to overcome.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,522
    you have spaces next to the # sign, remove it.
    (dates also work as text with a quote sign)

  3. #3
    George is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Feb 2012
    Posts
    295
    Thank you.

    Also the bound Column had to be set to 2

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

Similar Threads

  1. Replies: 22
    Last Post: 01-23-2015, 01:16 PM
  2. Matching date values .. in query
    By edmscan in forum Queries
    Replies: 3
    Last Post: 07-22-2014, 09:45 AM
  3. Matching id values between two tables
    By Nimo in forum Access
    Replies: 8
    Last Post: 06-04-2014, 01:29 PM
  4. Replies: 3
    Last Post: 07-19-2012, 06:51 AM
  5. Can Microsoft Access Matching Values?
    By Toniol in forum Access
    Replies: 0
    Last Post: 12-23-2008, 05:35 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