PLEASE HELP - Filtering

  • Thread starter Thread starter Komeil
  • Start date Start date
K

Komeil

Guest
Hi, I'm working on a huge database. There's a HUGE form, and it's currently sorted by date.

I have constructed a form with a bunch of buttons. Each of these buttons have a purpose, to bring up that pervious form I was talking about (above), but by filtering a certain chunk of time. You see this Button is by a particular Period..... how do I construct this command button to filter that other form (specifically on the date field) in between particular dates?

I dont want to have to create a query and form for each period, it's too much, and I know there's a way to set up a button to filter a particular form, I'm just not sure how....

PLEASE PLEASE PLEASE help... :D

thank you...
 
Is the form what's huge, or the table behind it?

I get the impression you're trying to limit the data that your form pulls up, and it's the data table that's huge, not the form's shape itself.

Look into the WHERE clause of the OpenForm action (or method, if you're able to use VBA). You can specify a time Between XX:XX XX And YY:YY YY.
 
If for some reason that doesn't work, you can filter your entire recordset:

Code:
Function filter_date()
    Dim strFilter As String
    strFilter = "order_date = #" & Me.picker.Value & "#"
     DoCmd.ApplyFilter , strFilter
End Function

I created a DatePicker object in this case that filtered records to show only those that had a particular date. You can attach a button to this kind of code...

Dunno if this will help you or not.
 

Users who are viewing this thread

Back
Top Bottom