How to capture a user generated form filter
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,
Thank you for taking the time to report an issue.
What's wrong... Please write below.
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.
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).
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?
This approach works just fine in a single user input situation. However, if I have multiple users doing data input this causes some issues.
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.
This all works great. The problem is that once in the Customers form sometimes the user forgets that the form is filtered and it shows the one filtered record and not all 61 existing customers.
I have a filter or search box at the top of the Customers form that the user can click in and filter out a customer that way too.
here is the problem, the user then clicks the search drop down and tries to filter again. I have tried to program in the "on click" event in the search drop down. I have tried, FilterOn = False or ShowAllRecords.
This will not work to turn the Toggle Filter button off and show all the records.
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)?
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.