Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / July 2007

Tip: Looking for answers? Try searching our database.

Counting records in report

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vaa571 - 13 Jul 2007 19:44 GMT
I have a field in a Table (Pass/Fail), the data is entered when after a test
result that by a testing program. The result will be either Pass or Fail (if
it has failed the test). I would like to add a count of the number os
failures found and also list the failures seerial#, (there is a field in the
table with the serial #). I am having trouble with the expression, does
anyone has an idea how to make this work? Thanks
Val
Larry Daugherty - 15 Jul 2007 06:01 GMT
The general rule for posting an issue is "one per thread".  If you
haven't visited www.mvps.org/access I suggest that you do for all of
the terrific Access lore there and also "net etiquette".  Pay close
attention to the bit about including details.

All of the below is air code so you may have to twiddle and tweak to
get a satisfactory result.

To answer the question in your subject line:

in your report design, put a new text control on the line with the
existing text control that receives the Pass or Fail result.  Make the
default value of that new text control something like
IIF(Me!txtPassFail = "Fail", 1,0)
make that text control invisible if you don't want to see it.

Sum the count of that text control in the part of your report where
you report the totals.

----------------------------------------
For your bonus question - there are lots of ways to generate a list of
failed serial numbers.  Here's one:

Create a static function named something creative like

 ListFailNos(SerialIn as string) as string
       ListFailNos =  ListFailNos & SerialIN & vbcrlf
 end function

You could create a new field in your query and call the above function
on each failure.  Something like

   ItFailed: =ListFailNos(Serial Number)

Create a text control in the summary section of your report where
you'd like to see the list of failing serial numbers.  Bind that
control to ItFailed.

HTH
Signature

-Larry-
--

> I have a field in a Table (Pass/Fail), the data is entered when after a test
> result that by a testing program. The result will be either Pass or Fail (if
[quoted text clipped - 3 lines]
> anyone has an idea how to make this work? Thanks
> Val
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.