How to capture a user generated form filter

I'm trying to allow a user to drill down to a selection of records using the individual drop-down filters in the datasheet view of a split form, and from there make modifications to just the filtered records using VBA code.

and I can't figure out how to use code to save the manual filter choices. When I open and edit the recordset based on the form's recordsource query, it edits all the records in the query, not just the filtered set.

I think I need to save the filtered version of the query behind the form before I can work with just those records,

Sponsored Links:

Related Topics

Capturing Autonum on New Record Insertion
I'm looking for a method to capture the unique id for a row that is inserted into an Access table. I have a command button that I would like to do the following:

1) insert the fields in a form into the supporting table;
2) capture the autonum generated unique identifier in a field on the form;
3) have this data available to pass to a subform based on a table with a one to many relationship to the previous table.

On No Data Event
Is there a Forms event similar to the On_No_Data event with reports? I have a small form that builds a filter for a recordset. If I run a DoCmd.OpenReport I can trigger No Data event when the filter finds no records. However, if I use a DoCmd.OpenForm with the same filter, a blank form displays. I would like to prevent the Form from displaying if no records are found by the filter. What is a good approach to capture the fact that no records meet the filter criteria?

Showing a filtered data description on form
I am currently experimenting with Access and I would like to create a feature where user can check on their number of task based on their updates. I have currently created a form where it can capture user NT login and filter the task based on the user NT login

For example, User A just completed 20 out of 120 of his task. Can this kind of statement appear on the form

Total task : 120

Use subforms filter for chart record source
I have a sub form and related chart in 07. Can I capture the filter on the sub form and use it to filter the chart?

Save current filter as query (realtime)
They are using a QBF (Query By Form) and then applying that filter. I then have a button on that form they can click that needs to print out only the reports of the records which fit the QBF.

1. When a user creates a QBF and clicks apply filter,


2. What is the name of the current filter? In otherwords, when a user creates a QBF and clicks apply filter, MSAccess is applying that filter which it has stored somewhere -- what is the code name of that filter? (eg. Me.CurrentFilter)


3. How can I allow a user to filter a form and then print the filtered list (not all of the records, not just one, but the ones that matched the filter).

Possible to have single filter for a mix of blank and non blank criteria?
Though there are lots of threads about multiple criteria.

Is it possible to have a SINGLE filter button that filters a form only by the filter criteria that the user specifies and not the possible criteria that the filter may have? That is, ifthere are multiple criteria that the user can filter by but she only chooses to specify, say, two out of five, and leaves the other three filter boxes blank, I want the filter to only pickup the ones she specified and NOT filter by Nulls in the other three fields.

I have 5 fields on which the user can filter by typing in what they want in text boxes. I don't want to have 5 separate filter buttons, I want just one that sets the filter on all the specified criteria.

Is it possible for the button to pick out only the criteria that the user specified? I mean, without having to go through ten thousand if statements like

If len(me.filterfield1)>0 and len(me.filterfield2)= 0 and. len(me.filterfield5)= 0 then
'set filter string to just the first criteria


.and so on.

Or is it better to just have a separate filter button for each text box?

Open a second report and apply the first report's user filter
I have a report (rptStudy) which a user can filter by means of several text boxes in a form (frmSearch). The filter criteria is entered into the form which then opens the report, applies the filter, and closes the form. Works great. Here is my problem: I would like to have a command button on the report (cmdOpen) which opens a second report (rptStudy2) while keeping the same filter applied to the second report.

I'm sure the solution is easy, but I cannot find it anywhere

Complex issue in MS access
Im doing a project in access which I have created tables, forms and reports I have applied user secuity in my project.some users have editable permissions and some doesnt have.
In my form I have two fields which will capture system date & time as start time and end time.
start time will capture the time when the user starts keyin and the end time will capture the time after the record has been inserted in the table.
My problem is for non-editable permission users,the end time is not storing the time after inserting record since it will capture only after insertion and it goes to update state for whom doesnt have update permissions.
Hence I need code to capture and store the end time after the users filling all fields and before insert in to table.
Hope you guys got my problem. Plz provide me a solution

Opening a form to a specific record
I have a button the user presses to save the record, close the form, and open up another form to the most recent record where theuser can enter in more detailed data about the record.

This approach works just fine in a single user input situation. However, if I have multiple users doing data input this causes some issues.

For Example:

User A assigns the records primary key (#1) with the first keystroke entered. User B begins to input, assigning a new primary key (#2) to the new record. User A finishes the basic input and presses the button saving the record and opening the second form for more detailed entry.

As the second form takes you last record enterend, the record displayed for user A has the primary key of #2.

This is not the record User A started with but is the record being prepared by User B.

Essentially, what I'm looking to do is, capture the value of the primary key close the first form and open the second form where the primary key is equal to the capture value.

capture current user
Is there a way to capture the current user if the user is making updates directly in the table

Filter Subform from user input
I have a main form (frmMainMenu) and a subform (frmSub). I already have a number of filters, which filter by specific data. Here is the code i am using for that:

With Me.frmsub.Form .Filter = "[Franchise] =" & """Abarth""" .FilterOn = True End With

I am wondering if i can using something similar to either prompt for a user input, or for the user to type what they want to filter in a text box, and filter by that?

Filter to only view Current User's Records in a Microsoft Access form or query
There may be circumstances where you, as the database developer, may only wish to allow the current user of the Microsoft Access database to view only their own records. This can be achieved using various approaches and you will find one way of dealing with this shown below.
What we need to do to achieve this:
Create a module to capture the Current User accessing the Microsoft Access database.
Store the User Name to pass this to the Microsoft Access forms or queries.
Display information that relates to the Current User only.

Automatic Filtering when Opening form
Is there a way to set up a form so that it applies a filter automatically when the form is opened so that a user only sees the filtered records without having to press the filter toggle or filter every time?

How to: Use User Input to Build Filter Criteria
The BuildCriteria method enables you to easily construct criteria for a filter based on user input. It parses the expression argument in the same way that the expression would be parsed had it been entered in the query design grid, in Filter By Form or Server Filter By Form mode. Learn how to build criteria based on user input.

Multiple Forms data Entry
I currently have a form that is used to capture the time spent doing a task. A user will log in to the database, click on a button, this form will pop-up, the user selects the task from thedropdown and captures the time spent.
However, many times a user can be multi-tasking and doing several tasks at once. How do I open multiple forms of the same data entry form. So that the user would click on the button andmultiple forms will pop-up to capture a task.

Adding a Filter to a Form
A filter can restrict or sort the information displayed in the form without creating a new query. You can define a filter as: Filter by Selection; Filter by Form; Advanced Filter definition facility.

Filter Sub Form in VB by button Filter Property
Access 2007, not compiled, not split, Windows 7, Filter Property, I have never used filtering before, VBA skill levels moderate.

I have a main form where the end user will schedule several hundred meals, or thousands, by date, usually a month at a time. The meals appear in the sub form once they are scheduled.

The user might be in the middle of scheduling meals for a particular month and get interrupted. When they come back there are so many records they have a hard time finding where they left off.

They want to be able to filter the sub form by date range. They would be filtering against the date field in the sub form "DateAssigned".

As the sub form shows they started scheduling for March. But there may be 1,000 records and it is hard to find where they left off. What I need to do:

The end user selects a date range in the two fields that they want to filter for. They click Filter Menus button. The Filter Property in help or articles is not clear for me.

How to apply a filter to a subreport?
I have a report that contains a subreport. When a user tries to open the report, what pops up first is a filter form that collects filter criteria. When the user clicks OK on the filterform, a subroutine named ApplyFilters() (adapted from an original by Allen J Browne, thanks Allen!)is called, which makes the user choices into a WhereCondition and then calls OpenReport,which assigns the WhereCondition to the Filter property of the report.

Fine so far. But what I need to do is assign that same WhereCondition to the Filter property of the subreport as well. (Yes, the report and the subreport both have the same-named columns, so the filter is appropriate in both places.) I figure that the way to do this is to put a statement into the suitable event handler that basically assigns the report's Filter property to the subreport's Filter property.

Capture UserID and add to record
I have a login form where a UserID and Password is entered. When the user creates a new record, I want to add the UserID to the record.

I have a form, bound to a table, where the user enters info for a new record. How do I capture the UserID and add to the record

Retrieve User Name and select Record based on such
And I understand how to use this to track who has made changes to the Database.

However, is it possible to get Access to retrieve the User Name before it opens a Form so it can apply a Filter.

When a User opens a Form "Time Sheets", I would like Access open the Time Sheets form and to apply the Filter based on who is logged in. I Know there is a Filter and Filter on Load Propertyon the Data Tab, but if I add the GetNetUser () to this, it just opens the first Record on the list and applies a Filter to that (I created a Staff Record for "Brian", which is my UserAccount, yet it Filtered to the first Name in the Table--not mine)?