Topics Search

Filter a continuous form

Filter a continuous form
Views: 66
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:

Similar posts...


Clear records off of continuous form

Clear records off of continuous form Icon
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

Filtering a continuous form Icon
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.

Creating Filters on a Form

Creating Filters on a Form Icon
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

Generating graph from continuous form

Generating graph from continuous form Icon
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.

Form Filter "Missing Data" Using VBA

Form Filter "Missing Data" Using VBA Icon
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

Get position of record in continuous form

Get position of record in continuous form Icon
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?

Filtered Reports & Continuous Forms

Filtered Reports & Continuous Forms Icon
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?

Continuous Form which includes a Sub Form

Continuous Form which includes a Sub Form Icon
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.

After sort all records are shown – form filter not working

After sort all records are shown – form filter not working Icon
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.

FilterOn = False

FilterOn = False Icon
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