Filter Count question

B

Ben

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
 
M

Marshall Barton

Ben said:
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
.MoveLast
Me.AI_Open = .RecordCount
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top