Results 1 to 6 of 6
  1. #1
    Jaik is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2016
    Posts
    33

    query filter based on text box on form

    Hi guys,



    I have question on filter on text box. Right now I have [Forms]![Workday]![enddate] on query to receive value based on what user types on text box.
    However I would like to do something like [Forms]![Workday]<="#[enddate]#" which is get all data where value is equal or less than input value in text box.
    But that parameter is not working. Is there any way to solve this problem?
    The data type for [endate] is number.

    Thank you

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    The data type for [endate] is number.
    Can you give an example of the data in this field
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Jaik is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2016
    Posts
    33
    The query contains 3 number data type columns Balnce, Invoicedate, enddate. I am trying to sum all [balance] based on what user put value on text box.
    ex. value in enddate is like 2015, 2014, 2013 .... etc its number data type

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    As the data in [enddate] is not actually a date you should not need the date delemiters #
    Perhaps something like:
    <= [Forms]![Workday]![enddate]
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    Jaik is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2016
    Posts
    33
    Thank you so much! This code is perfectly working for me

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Glad to be of help
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 2
    Last Post: 04-05-2016, 11:02 AM
  2. Replies: 5
    Last Post: 06-09-2015, 08:45 PM
  3. Replies: 3
    Last Post: 06-18-2014, 10:40 AM
  4. Replies: 1
    Last Post: 03-05-2012, 07:35 PM
  5. Form Based Query/Filter
    By Micon in forum Access
    Replies: 0
    Last Post: 11-07-2008, 09:25 AM

Tags for this Thread

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