Results 1 to 8 of 8
  1. #1
    dominic francis is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2016
    Posts
    5

    displaying only current reocrds


    I have a table with an start date and end date fields. I am trying to find a way to only display records on the form that are prior to the end date. any help would be great. been a long time since I have done any VB programing. please help

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,445
    you would use a criteria something like this

    where enddate is null or enddate>date()

  3. #3
    dominic francis is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2016
    Posts
    5
    Not sure what you mean

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,445
    perhaps explain more clearly what you have - form recordsource for example? can enddate be null?- and what you mean by 'only display records on the form that are prior to the end date' - provide some example data and identify which records you want to include

  5. #5
    dominic francis is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2016
    Posts
    5
    I have DB with a list of houses to monitor. each record has a start and end date. I'm trying to have the form view only show the records where the end date has not past

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,445
    Not sure what you mean
    OK - so you have a form. That form has a recordsource, which for what you want will be something like

    SELECT *
    FROM tblHouses
    WHERE enddate is null or enddate>date()
    substitute table and field names for yours

  7. #7
    dominic francis is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2016
    Posts
    5
    I have tried and i keep getting error about cant findrecord source. could you help my form is called "residence check form" and my table is "residence check input table

  8. #8
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,445
    looks like you have spaces in your names if that is the case, you need to surround the names with square brackets i.e

    [residence check input table]

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

Similar Threads

  1. Replies: 2
    Last Post: 06-01-2016, 07:53 AM
  2. Displaying 0's
    By O.92 in forum Queries
    Replies: 1
    Last Post: 12-14-2015, 04:16 PM
  3. Code to add monthly reocrds to table
    By SMcGrath in forum Programming
    Replies: 4
    Last Post: 12-12-2013, 04:54 PM
  4. Replies: 10
    Last Post: 10-14-2013, 10:18 AM
  5. Replies: 5
    Last Post: 12-06-2011, 11:18 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