Filter a continuous form

I am trying to filter a continuous form to show only records between two dates. On the form I have a field call ScheduledStartDate and two text boxes one call txtStartDate and the other named txtEndDate. I allso have a command button named cmdApplyDateFilter with the following code.

Private Sub cmdApplyDateFilter_Click()
Me.Filter = Me.ScheduledStartDate = " Between #" & Me.txtStartDate & "# and #" & Me.txtEndDate & "# "
Me.FilterOn = True
End Sub

It 'appears' to work but returns no records when I enter a date in each of the ext boxes. The dates are in a valid date format similar to 0810/2011 and 08/31/2011

I know for a fact that there are records that fall into this date range

Sponsored Links:

Related Topics

Clear records off of continuous form
Im trying to find a command to clear all the records on a continuous form that were called up using a strWhere Filter and combo boxes.

There are four unbound combo-boxes in the header that the user can choose from and then I have a command button coded to filter (Me.FilterOn) for those criteria.
The matching records display in the details section of the form (continuous-style).

Is there a command to reset the details section of the form to be blank? Ive tried refresh, requery, repaint, etc. All of these leave the previously queried data. Removing the filter doesnt work because that display all the records. I basically want the form to look exactly the way it did when it was first opened.


Filtering a Continuous Form
I have a basic continuous form in Access 07. It has the following fields:
Serial #, Part Number, Model #
I want to put combo boxes in the header to filter the form. I have a combo box for each field. I named them:
SerialSearch, PartSearch, ModelSearch
The combo boxes are based on tables to automatically update when a new serial, part, model # is added. So, I got this far, so now I have a continuous form with three combo boxes in the header. I can select a value from the combo boxes. I have tried to put in code for the filter. It will filter perfectly in the ModelSearch combobox, but the others will not. Attached is my database. If someone could please take a look, it would be a great help. It will open to the form that needs


Filtering a continuous form
I have a basic continuous form in Access 07. It has the following fields:
Serial #, Part #, Model #
I want to put combo boxes in the header to filter the form. I have a combo box for each field. I named them:
SerialSearch, PartSearch, ModelSearch

The combo boxes are based on tables to automatically update when a new serial, part, model # is added. So, I got this far, so now I have a continuous form with three combo boxes in the header. I can select a value from the combo boxes, but I have no idea how get these to filter the records. I would like to be able to enter values into multiple combo boxes and have it filter, or when the combo boxes are blank, I would like it to show all records.


Filtering a continuous form
Wow, I feel like I'm loosing my mind at the moment! I have a basic continuous form in Access 07. It has the following fields:
Serial #, Part #, Model #
I want to put combo boxes in the header to filter the form. I have a combo box for each field. I named them:
SerialSearch, PartSearch, ModelSearch
The combo boxes are based on tables to automatically update when a new serial, part, model # is added. So, I got this far, so now I have a continuous form with three combo boxes in the header.

I can select a value from the combo boxes, but I have no idea how get these to filter the records. I would like to be able to enter values into multiple combo boxes and have it filter, or when the combo boxes are blank, I would like it to show all records.


Filter a Continuous Form
and have been trying to find a way to filter a continuous form using a combo box.

The database only as one table called Students, and the field that I use for the combo box is called TTS_Class.

What I want is when I open the continue form (called Student_attendance) that I use the drop down to display only those students that are in the selected class.

I have tried different methodes and just cant figure it out


Generating graph from continuous form
I got a continuous form (referred as Form1) which has a dropdown and a few textboxes to generate a filter for the from. There are also two command buttons, one for filtering the data, one for generating a graph in Form2.

The problem is with generating the graph. I'd like to use the form's filter for bounding the graph's data. So records shown in Form1 must be used for the new graph (Graph1 in Form2). Isthere a way to copy the filter to the new form or use the data?

I know that this is explained quite weirdly, but I cannot think of another way at this moment.


Creating Filters on a Form
I have a form which has the following fields:

StrContactNo, StrLName, StrFName, StrAddressLine1, StrAddressLine2, StrParish, StrMale, StrFemale

The form is continuous and is a pop up form.

I would like to filter the data by Last Name on the form so as to the view a particular person rather than having to scroll down the list.

I tried the filter option which on Northwind database and cant seem to get it to work, I tried this link . not working, and several others on the internet cant seem to get the filter to work


Form Filter "Missing Data" Using VBA
I have a continuous form and some of data is missing. (I'm making a Contacts Database). How would I filter out the missing info using the "Form Filter" feature. P.S, I want it so that when I click an option button it filters.

Private Sub Option25_Click()
Me.Filter = " "
Me.FilterOn = True
End Sub


Filtered Reports & Continuous Forms
I have a continuous form with controls in the header that filter the records. However, this doesn't seem to effect the underlining query (RecordSource=query) as in, after running the filter, the underlining query still shows all records even though my VBA uses my query. How do I then create a report that shows the filtered results?


Get position of record in continuous form
I have a continuous form that displays various data. I have a button on the form that opens a popup form, displaying content relevant to the current record in the continuous form. I would like this popup form to appear directly below the current record in the continuous form,

I tried to use .Top property of any of the controls in the continuous form, but the.Top property is 0.

How can I get the screen position of a control for the current record in a continuous form?


Get position of record in continuous form
I have a continuous form that displays various data. I have a button on the form that opens a popup form, displaying content relevant to the current record in the continuous form. I would like this popup form to appear directly below the current record in the continuous form, if possible. I tried to use .Top property of any of the controls in the continuous form, but the .Top property is 0.

How can I get the screen position of a control for the current record in a continuous form?


Continuous Form and a Combo Box Filter
I have a continuous form with the following fields. Case No -- Completion Date -- Cost 1 -- Cost 2 -- and a few more...

The field I'm interested in filtering the form by is the 'Completion Date' field.

I would like to have two combo boxes, one to filter by month and another to filter by year.

My first problem is how to populate the combo boxes based on the data that's available, the month combo box can quite happily have and the months of the year, but the year combo box shouldonly show available years since I don't think it's ideal to have to pick from every year past, present and future.


Continuous Form which includes a Sub Form
Is there any way to allow a sub form to be a Continuous form which also includes a sub form> Actually, I've made a Main Form (frmMain) which includes only two combo box to filter. and then I've added a sub form (frmStudents) which also includes a sub form (frmAttendences).

(frmStudents is linked with the combo box in the frmMain)

But now I want my sub form (frmStudents) as a Continuous form but it does not allow me because it also contains a sub form.


FilterOn = False
I have a main form with a continuous subform. I am filtering the subform

by using the following code from the main form and it works fine.

Private Sub Form_Current()

strWhere = "[Seder_Code]=" & G_Seder & " AND " & "[Bahoor_Code]=" & G_NameCode

Me.SubFormFines.Form.Filter = strWhere

Me.SubFormFines.Form.FilterOn = True

End Sub

The problem starts when I try to enter details on the continuous subform.

For example when I have filtered 3 records and I want to amend the third record the cursor jumps to the first line.

I've realized that it happens because the subform is still on FilterOn = True

I would like to turn off the filter and to be able to change the details on the subform and still having only the 3 records that have been filtered before.

Where can I switch off the filter and how


FilterOn = False
I have a main form with a continuous subform. I am filtering the subform
by using the following code from the main form and it works fine.

Private Sub Form_Current()
strWhere = "[Seder_Code]=" & G_Seder & " AND " & "[Bahoor_Code]=" & G_NameCode
Me.SubFormFines.Form.Filter = strWhere
Me.SubFormFines.Form.FilterOn = True
End Sub

The problem starts when I try to enter details on the continuous subform.
For example when I have filtered 3 records and I want to amend the third record the cursor jumps to the first line.

I've realized that it happens because the subform is still on FilterOn = True

I would like to turn off the filter and to be able to change the details on the subform and still having only the 3 records that have been filtered before.

Where can I switch off the filter and how


After sort all records are shown – form filter not working
I have a continuous form (Item) where each record has a field ItemKey and a command button that open a second continuous form called Service. The records in the second form has a field called ServiceKey and the form filter is ServiceKey=Forms![Item]![ItemKey].

When the second form opens only the matching records are shown. The second form also has a command button used to sort the records.


Continuous form inide a continuous form
I know Microsoft says that you cannot do it but I have a situation where I want to display all the plants that meet certain criteria and all the sizes for each plant along with the qty remaining.

I do not want to repeat the plant info for each size.This ideally is a continuous subform inside a continuous subform. The main form sets up the filtering criteria.

Is there any other way of achieving this kind of result?


Form Filter
I am trying to filter a form based on a different form that is not open.

Example, I have a continuous form with names. A different form holds notes for these people, and are connected by ID.

Here is some sample code I am trying to get to work. I have something in the syntax wrong, please help!

strFilter = "forms![main_tracking_notes]![comment] like '*" & strSearch & "*' WHERE forms![main_tracking_notes]![Main_Tracking_ID] = " & Me.[ID] Me.Form.Filter = strFilter Me.Form.FilterOn = True


Obtain value of textbox - continuous form
I have a continuous form and when the user clicks on a specific text box another form is opened. What I want to occur is for the value of the textbox that they clicked to be passed to the new form. Since this is a continuous form I am lost in obtaining the value of the textbox. Any help/direction will be


Filter not working the first time
I have a continuous form in Access 2007 that shows all records in an inventory. At the top of the form are search boxes for each field to filter the form (After Update).

When this form is first opened and something is typed into one of the search boxes (then press Enter or click another box) the filter is empty showing no records at all.

The user can click the "Clear Filter" button then type the same thing into the box and everything works fine. None of the search boxes work the first time after the form is opened, but they work good from then on until the form is closed. Here is the code (with some of the redundant fields left out);