Modules & VBA :: Sort / Filter Dropdown Being Disabled?
May 2, 2015
I'm using a dropdown that has the months of the year in it. The user selects a month and the form is then filtered by a date if its the first of whatever month is selected. It works fine but when the filter is applied I cant select the little arrow on the column headings and select the boxes (Select All, Blank, ETC...). It doesn't work on any column, just the apply text filter works but I cant select anything.
It works fine when I clear out the filters on the form. I tried to use vba to set the menusetting property to true and that didn't work either.
View Replies
ADVERTISEMENT
Dec 27, 2013
I use the following xml to create a ribbon for Sort and Filter
Code:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<tabs>
<tab idMso="TabCreate" visible="false" />
<tab id="dbSearchtab" label="Sort and Filter" visible="true">
<group id="SearchScreenSort" label="Sort and Filter">
[code]....
The first problem is that this ribbon appears in forms where it is not included.The second problem is that in addition to the "File and Filter" tab, there appears a "File" tab Whe you click on it is goes backstage allowing you to Print and Exit.
View 2 Replies
View Related
Mar 6, 2015
I'm trying to sort and filter a continuous form. Sort ascending and filters works perfectly fine. But my descending button doesn't work. I basically have a combo box which contains a field list. Then two buttons (asc. and desc.), then a text box for filter, a button to filter, and another button to reset filter. Here's my code:
Code:
Private Sub cmdAscending_Click()
If IsNull(Me.cboField) Then
MsgBox "Please choose a field.", vbOKOnly, "No field to sort."
Else
Me.OrderBy = Me.cboField
Me.OrderByOn = True
[Code] ....
View 8 Replies
View Related
Apr 14, 2006
Dropdown Filter Forms
I’m working on building a form that has the ability to create and print a report based on the filter’s you pick.
Example:
Say you have a form with five dropdown boxes
Dropdown 1: VP’s Name
Dropdown 2: Manage <-at this drop down you will only see the Managers who report to the VP that was picked.
Dropdown 3: Supervisor at this drop down you will only see the Supervisors who report to the Manager that was picked.
If someone could direct me to the best place or help me understand how to do what I asked about that would be great.
Thanks
Corey
View 1 Replies
View Related
Aug 19, 2004
I'm a new user with access and I'm trying to build a "Status" report based on criteria within the database.
I've setup a form where the user would choose which "Status" they want to print on the report but in all my reading
(two days worth) I can't figure out how I should accomplish this task.
I'm attaching the database and the form is "frmStatusReport". If someone could take a look at it and give me an
idea of the best possible solution, it would be greatly appreciated.
Maybe someday I can pass my knowledge on to another newbie...
View 2 Replies
View Related
Jan 22, 2015
I have an mdb file that is being used in Access 2013. The menu appears in the Add Ins as it is supposed to and it works for the most part. For some reason, it remains visible but is not clickable/operable after I do the following code. This all works flawlessly in earlier version of Access so it must something peculiar to 2013 (no surprise there....). hat would cause the ribbon to stop working, what to do when it does, and best of all, how to prevent it from occurring in the first place?
This code is for an option box that either prints a report or creates a pdf and then sends the report as and attachment to a CDO generated email. Other than it (seemingly) turns off the menu..THe site won't allow me to post links so the code is an attached txt file
View 2 Replies
View Related
Nov 29, 2013
I'm using a mousemove event to display help text for controls in my form.This works well, but I'd like to display help text when the control is disabled as well (to explain to the user why it's disabled).is there any way to fire a mousemove event when hovering over a disabled control?
View 1 Replies
View Related
Aug 4, 2005
I have some very simple code on a button on a form to sorts my data by company name. But as some of my data is for friends, I want to be able to add a line in that looks at the "Category" field and only includes those that are a "business". Can I do this.....?? So some sort of filter.
Private Sub Command43_Click()
On Error GoTo Err_Command43_Click
Me.OrderBy = "CompanyName"
Me.OrderByOn = True
Exit_Command43_Click:
Exit Sub
Err_Command43_Click:
MsgBox Err.Description
Resume Exit_Command43_Click
End Sub
View 2 Replies
View Related
May 4, 2005
I am using a handheld scanner to scan in barcodes. However the part numbers contain more data than I need. Is there a way to get ride of the extra data I scan in in Access.
Say I have part ABCD- 7G675 .. I only need 7g675 to be in the field. Is there a way to do this besides a find replace, that would take way to long.
View 3 Replies
View Related
Sep 24, 2013
I am using Microsoft Access 2010. It provides great filtering and sorting options in the ribbon for any object. But what if I hide the ribbon and want to create custom buttons on the form to do the filtering and sorting job? There are some filter options available in macros but are not quite like the ribbon's own Filter button. When the Filter button is clicked from the Robbin, a filter menu pops-up under the active field, which doesn't happen when I try to do it using Macro functions like "Apply Filter" or "Set Filter" etc. I want to have that big "FILTER" button from the Ribbon on my form.
View 2 Replies
View Related
Apr 6, 2006
Basically i have a mortgage application system which im running a query on to see which applications have been completed in the last week or period up to now ie. last week, last month, last 3 months.
basically each application or CaseID has one or more applicants. The majority of them have two applicants. A few have one.
Problem is when i run this query which shows me: - CaseID, CLIENTNAME, LENDER, PRODUCT, MORTGAGE RATE, LOAN AMOUNT -
it brings up these fields but i only want one occurence of each CaseID????
CaseID Forenames Surnames PRODUCT RATEDateCompletedLoan required
2821NothandoDube71116.6920/01/2004£63k
2821Sipho Dube 711 16.69 20/01/2004 £63k
2909Hobbly Chise 726 15.69 31/01/2002 £164k
Get the picture? Both Sipho and Nothando are applicants on the same mortgage but i only want to show one name. Anybody know how to help me out???
Ive taken up this existing system, so i think there's possibly a normalisation problem thats causing this. But i need a quick fix for now rather than redesign the whole system.
View 2 Replies
View Related
Apr 24, 2014
I have a form that shows multiple rows of linked/child records.The form in question is the "frmFilterNumberTypeView" form. When a particular filter is used (installed on an automobile), I would like to be able to click on the corresponding "Installed 1" button left of the filter number, so that by code, I can reduce the Qty on Hand by One, and insert the corresponding filter ID to the History table, along with the date/time the filter was used.
how to reduce the Qty on Hand, nor how to do the updates to the History table, I'll figure that out myself over the next week or two (hopefully it won't take that long). What I'm trying to figure out here is how I can associate the red "Installed 1" button with the filter to the right of whichever button I press.
how to sort the filter column on this same form. I'm fairly certain that this would be very easy to do if the subform in question was populated by means of a corresponding query, but I'm afraid that if I go that route that I'll spend another 20+ hours trying to figure out how to get the proper filter records to match the filter manufacturer, not to mention having to next figure out how to link the table so that if I modify any particular filter record, that I'll be able to have the associated table update accordingly.
Is it possible to sort the filter column without the subform record source being a query?
View 2 Replies
View Related
Oct 20, 2014
The recordsource is a query with over 6,000 records. The form currently lists the records in datasheet format with header and footer for things like buttons and filtering. The client wants to be able to go from page to page of the souce query, showing 100 records on the form at a time.
But at the same time, they should be able to filter or sort the data source in it's entirety. The person who created the form came up with what seems like an awful solution to the problem. It seems to use a random number generator to determine how many records to portray at a time. I see this in the code as well as in operation, because the number of records on page to page varies. It doesn't even start out at 100! Worse yet, using a sort on the page only sorts the records that are visible.
View 9 Replies
View Related
Jul 28, 2014
I currently have a button that opens a report. the report pulls from a query that has parameters set to "fromdate" and "todate". instead of using dates and parameters that pop up as blank text boxes, I would like to click the button, have a form pop up with a combo box to select all of the options available (currently 23 options) and then click a button to make a report that only displays the record (1-23) selected. I do not need any time constraints because as the databases get updated with more records, there would be more than 23 options to choose from.
View 1 Replies
View Related
Jul 17, 2013
I'm developing a form to link a clause to one of a selection of internal documents from drop down boxes (of which there are a lot and hence looking for ways to make it more manageable to find).Now the setup of the internal documents is unfortunately beyond my control (separate SharePoint Libraries, inconsistent fields, you name it they've picked the worst way to do it :P).
I figure the best way to do this is to set up some unbound controls - two drop down (to narrow down location/department), two text boxes (doc code and name) with the idea that it will limit the selection to anything 'like' what is typed in.What I would like is either: How to set the RowSource criteria to only apply if the relevant control is not blank (i.e. if all the boxes are blank, all docs will show; if 'Sales' is selected in department and the user types 'Sales Order Entry' only the Sales Documents relating to order entry will appear)How to add criteria to the RowSource of a dropdown box via VBA (I've created the relevant 'If then ... else' statements but not sure how to add rowsource criteria in VBA)
View 2 Replies
View Related
Feb 10, 2014
I'm trying to hash two scripts I've found into 1 functioning filter, however I'm still relatively new to vba and can't figure out how to get this working.
I'm trying to use Allen Browne's Search Criteria:
with another snippete of code I found here:
Code:
'Purpose: This module illustrates how to create a search form, _
where the user can enter as many or few criteria as they wish, _
and results are shown one per line.
[Code]....
It's the date part I'm having trouble with, the rest of the search criteria work fine without the date, but I can't get it working when I try to modify and merge the date sections of each code.
Also I'm using a listbox for the "Yesterday";"Last 4 days";"Last 9 days" and not a combo box.
View 2 Replies
View Related
Dec 27, 2014
When I'm applying a sort and filter in a form, Access is updating the Filter and Order By properties of the form, so that it is possible to re-use in conjunction with Filter on Load and Order By on Load properties. However, a consequence of this is that when the form is closed, it prompts the user whether they want to save the design of the form. I want to circumvent this as I don't want to re-use the sort and filter and I don't want to be prompted to save the design of the form.
Although I can circumvent this by closing the form using a method that doesn't prompt for saving, the additional complication here is that the form in question is in the Navigation subform of a Navigation Control. Hence when I click on a another Navigation button, it (not me) closes my current form and hence prompts me whether I want to save the design of the form (if I have been sorting and/or filtering). I can't see how to circumvent this and the prompting is resulting in unacceptable usability.
View 2 Replies
View Related
Aug 4, 2014
I have a form where I have two drop down list box.The first list box is called Transaction_Type. It contains three values: Created, Allocated and Sold
The second list box is called Product_Status. It contains 6 items: Allocated, Produced, Reworked, Shipped, To Be Produced, Unallocated.
I have a products form. When a user created more inventory they will selected in the drop down list create, then a quantity. Then I would like the status of the product to update to "Unallocated".
When the user placed an order but doesn't finish it they will choose the status of the inventory to be allocated so I would like the product status to be updated to allocated automatically.
They other status the user will choose them self and do not need to be linked to each other.
In my vba code I have tried with the OnClick and AfterUpdate sub procedures with the following code.
If Me.Transaction_Type.Value = "Created" Then
Me.Product_Status.Value = "Unallocated"
End If
If Me.Transaction_Type.Value = "Allocated" Then
Me.Product_Status.Value = "Allocated"
End If
Yes when i select "created" from the drop down list it does not change product_status to say "unallocated"
(in using access 2007)
View 14 Replies
View Related
Dec 8, 2004
I am currently developing an app with MS-access. I need two drop boxs on the same form. First is states and second is cities. When user selects one state from the first dropdown box, the second dropdown box will only display the cities that in the selected state. Is that possible by using ms-access??
Tanks
View 7 Replies
View Related
Jun 11, 2012
I must create a database for the company that I work for that covers the maintenance history of our stone crusher plant. In this database I have two dropdown lists. The first one is for the equipment and the second one is for the different types of parts that has to be replaced or fixed.
Not all of the equipment uses all of the listed parts, but some parts are used on more than one type of equipment.
I have already created a database that lists all the equipment and another one that lists all the parts.
What I want to do now is create a Yes/No box for each type of equipment so I can mark which parts is used by which equipment.
Then you must be able to select the type of equipment from a dropdown list and then select from a dropdown list that only has the parts that is used by the piece of equipment.
I am using Access 2007
View 4 Replies
View Related
Sep 2, 2013
I'm displaying records in a subform that is in the datasheet format.I would like a sort button on my main form so that I can click a column header, press this button and it can sort the datasheet ascending.
View 4 Replies
View Related
Jul 20, 2015
I am using the following by Allen Browne to sort one field. But now I need to sort on two fields.
Code:
Function SortForm(frm As Form, ByVal sOrderBy As String) As Boolean
On Error GoTo Err_SortForm 'Provided by Allen Browne
'Purpose: Set a form's OrderBy to the string. Reverse if already set.
'Return: True if success.
'Usage: Command button above a column in a continuous form:
' Call SortForm(Me, "MyField")
[Code] ....
View 10 Replies
View Related
Nov 16, 2014
Can't find any way to declare variables in the sort of module that Access uses by default.Having changed the default, I now get 'Option Compare Database' as the first line (previously nothing was there). Adding anything at all in that section, or changing it to 'Option Explicit' has the consistent effect that all the procedure names in the module are not recognised and nothing works.
Variables declared in procedures work only in the procedure even if declared as Public. Can't get a Static variable to work in more than one procedure. However many variables I declare, there are never any in the Declarations list at the top of the Code Window.
View 3 Replies
View Related
Feb 26, 2007
hello,
I have this filename.mdb file which was given to me for revision, so I opened it with MS access but once I opened it, the toolbars are disabled so I can't switch to form view, design view etc. How can I resolve this? I remember when I once did VBA Access that you can do this 'disable' thing. Only that I forgot it how now. So if anyone could please help me in this? I need to 'have those toolbars back' so I can start editing the file. Please do help me.
Thanks in advance
View 2 Replies
View Related
Dec 17, 2006
Hello,
I have created a log in form in my database and users will enter their name using a combo. Is there a way I can force them to use the mouse and select their name and not type in the data? Basically something that will disables all keys from the keyboard? Thanks.
View 3 Replies
View Related
Feb 9, 2008
The # character in a hyperlink is used to separate hyperlink parts. Here is a case when I do NOT want this character to do the separation: a network file where the # character is part of the filename: k:datasomeFile#ref02.doc.
How can I put this URL into a hyperlink field in a table and NOT have Access treat it like this:
Address: k:datasomeFile
Subaddress: ref02.doc
which then of course results in the usual "Unable to open..." error.
(I tried replacing the # with %023 but when Access seems to convert it automatically to #).
View 3 Replies
View Related