Filter Count question

I have the following code:

With Me
        .Filter = "[Status] = 'Open' AND [Source] <> 'SE Meeting'"
        .FilterOn = True
        Me.Label32.Caption = "PCCB Action Items"
        .OrderBy = "[Group_Name], [IssueID]"
        .OrderByOn = True
    End With

When I execute this on a commandbutton it returns all the open action items 
not equal to SE Meeting as the source code.  That works perfectly.   

I have a new unbound textbox called AI_Open.  Once I execute the above code, 
i want some code that will count the number of open action items and put that 
number in AI_Open.  

Please help
2/13/2008 8:25:04 PM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 37

Ben wrote:

>I have the following code:
>With Me
>        .Filter = "[Status] = 'Open' AND [Source] <> 'SE Meeting'"
>        .FilterOn = True
>        Me.Label32.Caption = "PCCB Action Items"
>        .OrderBy = "[Group_Name], [IssueID]"
>        .OrderByOn = True
>    End With
>When I execute this on a commandbutton it returns all the open action items 
>not equal to SE Meeting as the source code.  That works perfectly.   
>I have a new unbound textbox called AI_Open.  Once I execute the above code, 
>i want some code that will count the number of open action items and put that 
>number in AI_Open.  

You can get a count if the records in the form by using:

With Me.RecordsetClone
	Me.AI_Open = .RecordCount
End With

MVP [MS Access]
2/13/2008 10:24:08 PM

Similar Artilces:

Filters *SOS* Filters *SOS* Filters *SOS*
1) On formLoad, I need to show only those items which are unassigned. 2) I need for the end-under to select only the items they are assigned to. 3) I need an option to select "ALL" so I can view all items. Any insight offered would be appreciated!!! On Wed, 29 Aug 2007 16:24:01 -0700, valdaiway <> wrote: >1) On formLoad, I need to show only those items which are unassigned. Use a query to put a criterion on the field that defines the assigned status. I assume you know how that information is stored in your table; nobody here does, ...

Criteria for Advanced Filter HELP
I have what I think is a simple question that I need answered IMMEDIATELY. I have a spreadsheet with 20 fields and I want to filter it so it only shows records that have something in of any of 5 of those fields. So once filtered, I will not have any records that have all 5 of those fields blank. I know I have done this before but I'll be damned if I can remember or find out how. -- Thanks You all are teaching me so much don't cross-post -- answer supplied in misc NG "knowshowrosegrows" <> wrote in message news:ACBC0...

Counting occurences of codes in cells
I have a spreadsheet with various codes separated by periods, in a single cell. Like: C T C,R T,C,R R and so forth. It's easy to count the single codes but how do I cound the "C" when it's with another character? There must be a simple way, without writing code, to do this. Is there? Thanks! maybe... =countif(a1:a10,"*" & "c" & "*") or =countif(a1:a10,"*c*") or if x99 contained the letter c. =countif(a1:a10,"*" & x99 & "*") salgud wrote: > > I have a spreadsheet with various codes separa...

Employee Filters
Hello: On the employee filters in the HR Preferenes window, would this restrict seeing employee information in both Payroll and HR? Also, would it restrict reporting on certain employees in a division or department? Thanks! childofthe1980s Your message does not indicate which version of Great Plains you are using. Using 8.0 with SP3 applied, HR filters do apply to some of employee information outside of HR. The settings will filter selected forms, Smartlists and Lists items. The HR filter setting do not apply to reports outside of HR. The filtered forms are: Employee Maintenance,...

Filtering based on a filter
Hello, I have an Excel Worksheet with a Pivot Table at the top with a Filter and a data set returned from a DB2 database below it. I would like to filter the DB2 data set based on the Pivot Table filter that is enabled. Any ideas? Thanks! James, You can't filter two ranges on the same worksheet. You can, instead, drill-down on your pivot table, which will show all items that go into the value on a newly created separate sheet. The drawback to that is that you cna only drill down on one item at a time, and it is a separate sheet. HTH, Bernie MS Excel MVP "James" <an...

Question on macros
I have developed a small number of macros and they work great when I use them from within the spreadsheet on my laptop. For some reason, when I copy the spreadsheet to a network location and open the spreadsheet from there, I get the error message "A document with the name <...> is already open." I don't understand why I'm getting this message as there are no other documents open Another question, when someone else opens up the same spreadsheet from the network (or the copy that I email to them), they get a message tat basically says that the macros couldn't be fou...

Wildcard Usage: I absolutely need this to count?/sum? two or more criteri
_*Number*_ _*Status*_ _*Date*_ N01-02 Draft 4-May-05 N01-02 Draft 4-May-05 N01-92 In Process 15-Oct-05 N01-88 Draft 15-May-05 N01-29 In Process 9-Jul-05 N01-32 In Process 9-Jul-05 N02-22 Draft 24-Aug-05 N02-27 Draft 24-Aug-05 N20-12 Assigned 3-Dec-05 N24-19 Draft 24-Aug-05 N33-13 Doc Written 4-May-07 N44-04 Cancelled 15-Oct-05 My header are Number, Status, and Date (columns A,B and C). The dcuments represent my rows (A2-A13). Since I ...

How do I count the amount of text in a column and then add them
For example I would like to count the number of Mondays inserted into a column and then sub total. Thanks =COUNTIF(A:A,"Monday") Peter Curtis wrote: > For example I would like to count the number of Mondays inserted into a > column and then sub total. > > Thanks ...

few basic (I hope) questions from a noob
Hi, It's been a few days since I began using MS VS.NET. I am trying to do a simple steganography project using MFC. I've got a few questions, I don't know answer to.. 1. I have a CEdit control, where I would like to display text loaded from a file. I've set multiline option on, the same with vertical scroll. I am using CString variable to load the text to it. Character after a character i am reading the file and appending it to the CString variable. But the text in CEdit doesn't seem to look even familiar to the text in file. Well, the text is the same, but there are ...

Question on the IMF filtering in exchange...
Hey I installed the IMF filter last night and it works great, with one exception. I set both thresholds to the same (5) and got almost all blocked emails into the archive that were junk...So that is good. However I had some users report that there was mail in their junk folder that should have been good Inbox mail. This I undersyand and can live with as folas-positives...the problem is, since both settings on the folter tab were set to 5, how does it know to send the mail to archive rather than Junk folder? Why wouldn't it just send them all to archive if both settings were at ...

Exchange Send as question
Good Day, I have a problem that perhaps somebody out there can help me with. We are running an Exchange Server 2003 with SP1 on a Windows 2003 with SP1 server. I have a user named Anne who is the Admin for two people Aaron and Liz. A few months back Anne wanted rights to send email as Aaron so she can just send email as him with out the On Behalf showing up in the email. I went to class after that and I asked the question on how can I do it. They said that I should just give her full rights to Aaron mailbox. So she already had full rights so I added the from option to her Outlook ...

Filtering without Filter
I just don't get the following. Any ideas? "A" row I have two different values I use: "Contact" and "Not a contact". "B" row I have the person's name (employee). "C" row I have a quantity, just one number. Now what I need is to output quantities of how many Contacts Employee1 or Employee2 or Employee3 have. Also what I need is to get the number of contacts - which can be found on row "C". Should I use COUNT.IF ? Row A can have 2 or more different values so should there be somekind of conditional IF function included? T...

Dirty Question
Dirty Question Hello, I have a question about the Dirty property/event=85 The following code will evaluate to False (which makes sense) when the record changes: ----------- Private Sub Form_Current() Debug.Print Me.Dirty Call IsRecordDirty End Sub The following code will evaluate to True (which does not make sense to me) when the record changes: -------------- Private Function IsRecordDirty() 'tied to the on dirty event of all text/combo boxes Debug.Print Me.Dirty End Function In the Immediate Window I see: False True Next Record: False True Why is me.d...

VS Setup Project Question
When you install a windows application, and then view the list of installed applications from the Control Panel, each installed application has a small icon next to it's name. I can't seem to control what that icon is. I have added a custom icon to the project manifest on the Application tab of the project properties. At that time, the icon was the same icon that the start menu shortcut displayed, the default icon. When I then added the same custom icon that I added to the manifest to the installed application folder and then set the start menu shortcut's icon to that icon,...

Filtering #11
Hi, can ayone tell me how I could do the following in excel 2007 or 2010: Horse Trainer Sam M Jones John M Jones Colin S Attwater Steve J Jackson Brian B Mathers James B Mathers Martin G Raggy Patrick S Thomson What I want to do is filter the dataset on 'Trainer' so that it only shows me the Trainers who feature once in the list. So if I was to do this properly it would only show S Attwater and G Raggy as the other trainers have more than one horse..... Hopefully someone can help because it is driving me crazy !! Thanks David Give this macro a try... Sub HideDuplicateTr...

Junk filter BEFORE other filters?
I am running Outlook 2003 and the Junk filter was working really well. Then I started making other of them looks for my domain name in the headers and if it's there it moves the email to a folder. Problem is, this filter seems to activate before the junk filter, so the junk sn't being filtered now! How can I set the junk filter to do it's job first and THEN to run my own rules? -- Bryan Anderson <> I created this rule and set it as the first rule to run: Apply this rule after the message arrives with 'X-Spam-Level:******'or'...

Several questions
I all of a sudden am using Excel again, this time Excel 7 and forgot how to do some things. 1.) How can I expand a page to fill the printer print area? 2.) How can I print all the worksheets on a single document? 3.) Or page 1 of each worksheet? TIA, GWB 1) You cannot expand a print area to fill a paper page. You can shrink it to fit a specified number of pages. Open Page Layout tab and launch (click on the arrow) the Scale to Fit group. 2) Office button (colourful ball) / Print / Print and in the Print What area (lower left corner of dialog)check the Entire Workbook box. 3) Off...

Pasting into a filtered list
Can anyone tell me if it is possible to paste a list of price updates into a filtered list. - I have filtered the list to show just the products whose prices need to be updated, when I try to paste the updated prices, into the list, the prices are not just pasted into the visible cells but the hidden cells between. Can I paste into the visible cells only or do I have to update each line manually. I am using Excel 2002 Any help would be much appreciated Can you sort the list to bring the products that need updating together in the list? If not, try something like this: Your list of product...

Macro to copy a VLOOKUP formula
Hello, I was wondering if somebody could help me with this macro… I have some data with a filter on, so that only the rows with blank cells are showing. I want to enter a VLOOKUP in the cell, and copy it down to all the blank cells. I tried just recording a macro, but when I run the macro it doesn’t work. Any ideas of how to do it? Example: 1) Before the filter: Colums A -B - C A x x - 1st Row A - 2nd Row A x x - 3rd Row A - 4th row A x x - 5th row 2) After the fil...

apply filter macro
I have a access db that works on win xp but does not work on win 2007 I have a combo box that triggers a apply filter macro using a query sort. no problem on win 2000 or win xp or win 2003 Help AlT ...

IP filtering based on corresponding MX records
Hello Dears, How can I implement the following? Used: Exchange 2003 SP2 in FE/BE configuration; FE is in perimeter zone (capable to “speak” with DNS, BE, DCs and retrieve info) So, somebody connects my FE to sent an e-mail to one of domain users. I need something like that: When connecting, see the “mail from:”; Verify if there is a record MX for the IP address from which the connection was established in DNS for the domain “” If not – drop connection (attention: MX record, not SPF) Is it possible with Exchange 2003 SP2 only? How? Thank you, Alex I be...

Month Filter
I keep a log of checks that I receive in my department throughout the year. I have the checks listed by date (mm/dd/yy), payee, check #, etc. What I want to do is be able to filter the list by month (ex., March 2005). Is there a way to do this? Thanks Joseph You can Try EasyFilter Joseph -- Regards Ron de Bruin "Joseph" <> wrote in message news:%23lQNnTawFHA.464@TK2MSFTNGP15.phx.gbl... >I keep a log of checks that I receive in my department throughout the year. I have the checks lis...

Using a form in Excel to Filter
I would like to create a form in Excel that is similar to a form in Access. This form will hold all fields on the underlying spreadsheet and enable the user to sort using combo box dropdowns. Ideally, the form would have a button titled RUN that will take all the data the user selects in the combos and filter the underlying spreadsheet. Can this be done?? If will save my life! TIA, Chris Try this Add-in -- Regards Ron de Bruin <> wrote in message news:1122677766.648239.226910@z14g200...

RMS Inventory count with laptop and USB scanner
Can someone point me to info about doing a RMS Inventory count with laptop and USB scanner? On Jul 14, 5:47=A0am, <j> wrote: > Can someone point me to info about doing a RMS Inventory count with lapto= p > and USB scanner? I can tell you it is not very easy. We tried to do it in our grocery store a few times and gave up. Some of this issues we had were: 1. We would scan and count a bunch of items and then loose internet connection and SO would crash losing everything before we saved. 2. The quickscan did not always work well (although i cannot remember why ...

filter for missing values in a range
I have a list in Col A ( about 2000) one to four digit numbers. I would like to ( for example) , in the 700's be able to filter and find out which of the numbers from 700 to 799 is NOT in the list. I know how to copy and paste to another col, etc. Thanks in advance for the wonderful help all of you give. One play .. Assume your source data runs in A2 down In B2: =IF(ROWS($1:1)+700-1>799,"",IF(ISNUMBER(MATCH(ROWS($1:1)+700-1,A:A,0)),"",ROWS($1:1)+700-1)) Copy B2 down by 100 rows to cover the full spread of numbers to be checked, ie # of nums from s...