Results 1 to 2 of 2
  1. #1
    Eranka is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2017
    Posts
    150

    Expression In Query

    HI



    Code:
    [StartDate:]>=[Forms]![Navigation Form].[Form]![NavigationSubform].[Form].[Text0] And [EndDate]<=[Forms]![Navigation Form].[Form]![NavigationSubform].[Form].[Text2]
    i tried above code in query criteria section, but not working, appreciate your help.

  2. #2
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    If your fields are called Start Date and end date the the criteria should be separated out per field;

    Click image for larger version. 

Name:	Criteria1.PNG 
Views:	11 
Size:	99.2 KB 
ID:	34518

    In SQL that would look like;

    Code:
    SELECT Table1.StartDate, Table1.EndDateFROM Table1
    WHERE (((Table1.StartDate)>=[Forms]![Navigation Form].[Form]![NavigationSubform].[Form].[Text0]) AND ((Table1.EndDate)<=[Forms]![Navigation Form].[Form]![NavigationSubform].[Form].[Text2]));
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

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

Similar Threads

  1. Replies: 2
    Last Post: 11-16-2017, 03:33 AM
  2. Replies: 4
    Last Post: 05-03-2016, 01:51 PM
  3. query with expression
    By Andreabelzo in forum Queries
    Replies: 3
    Last Post: 08-17-2015, 03:14 PM
  4. Replies: 2
    Last Post: 11-20-2012, 03:21 AM
  5. Replies: 4
    Last Post: 10-26-2012, 12:49 AM

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