Results 1 to 8 of 8
  1. #1
    zaza123 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    19

    I need help creating a filter button which filters from my start time to end time

    Help i hope im making sense here...I need create a filterbutton which allows me to filter stuff from my start time to my end time...when i input my start time, and i input my end time , all the data from my start time till my end time will appear this include those other time in the middle. Ill upload my project so u can have a look.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Which form?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    zaza123 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    19
    first form the mbb one sorry i forgot remvoe the others............

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    What is purpose of this form? You have it bound to a table but use every field in code to construct filter criteria. The form opens to new record but navigation to existing records is permitted. I am concerned about the Clear All button. This button sets all the controls to null value. Because the controls are bound to fields, that means the current record would be modified to all null values. Do you really want to allow that?

    Would there really be a lot of records with this same data, only change being a date/time? Sounds like lot of data duplication and table structure not fully normalized.

    Check out this tutorial on building a search form http://datapigtechnologies.com/flash...earchform.html. The parameterized query could be the RecordSource for your Filter MBB form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    zaza123 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    19
    june i dont get the video...it shows how to search for data but it doesnt store data if i were to use query. and as it is it doesnt help me with my start and end time problem.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    And I don't understand purpose for this form. Cannot use controls bound to RecordSource fields for search criteria input unless you WANT that input to change data in table. I have never seen a search criteria that includes virtually every field of a table. Makes me think data is not properly normalized. You don't have any relationships set in the Relationships builder so can't readily figure out your data structure.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    zaza123 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    19
    june i just need knw how to create a filter button to filter data from the start time till end time...i aint that good at access thats y if uc an show me a sample of what u mean that would be good.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Okay, something like:
    If Not IsNull(Me.Text70) And Not IsNull(Me.Text72) Then
    strWhere = strWhere & " [Date] Between #" & Me.Text70 & "# And #" & Me.Text72 & "# And "
    End If

    Problem is, the Date field in your table is Text, not Date, datatype. This criteria might not work without converting to date type.
    " [Date] Between #" & CDate(Me.Text70) & "# And #" & CDate(Me.Text72) & "# And "

    Not sure about Time field, it might be okay because all values include place holder 0s and have the same length. So use same If Then structure as with the Date.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Filter Report by Time
    By Tyork in forum Reports
    Replies: 4
    Last Post: 11-11-2010, 01:17 PM
  2. Replies: 1
    Last Post: 11-05-2010, 03:48 PM
  3. Creating a Time Tracker
    By share knowledge in forum Reports
    Replies: 0
    Last Post: 03-01-2010, 01:00 AM
  4. Command button for time & date
    By joet5402 in forum Forms
    Replies: 2
    Last Post: 12-20-2007, 02:59 AM
  5. auto start/stop time
    By j0ker21m in forum Reports
    Replies: 1
    Last Post: 12-10-2005, 08:42 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