Link to home
Start Free TrialLog in
Avatar of waverobber
waverobberFlag for United States of America

asked on

ACCESS DATA SHEET DISPLAY

Hello,
I have an Access 2007 database in which I allow the user to custom build a query. This is done via a series of check boxes. For example: 1) Show all members who are paying by credit card AND the member has not chosen to skip AND the member has not cancelled, etc.

From the information provided by the user in the check box group, I am building a SQL string. The string becomes a query definition and the query is executed. Currently, the user is shown the custom filtered information in a datasheet format.

Here's my question: The user doesn't care about the filtered data (datasheet view). All the user wants/needs to see is the number of members who fit the criteria selected. How is this done?
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

He's one way:
DIM rs As Recordset

SET rs = currentDB.OpenRecordset(strSQL)
If rs.EOF Then 
    Me.txtResult = 0
Else
    rs.MoveLast
    Me.txtResult = rs.RecordCount
End If

Open in new window

Ron
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of waverobber

ASKER

Works perfect. Thanks...