Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Oct 2002
    Location
    Sayre, Pennsylvania, USA
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need Help with Report Calculations (2000)

    Hi,
    I have a table called Parts. it's primary key is partsID. It's linked to another table called MachineInfo. There is another field called RecSource where we identify per part what source it will get ordered from (ie. Vendor, OEM, Tool Room). I have a form set up as a dialog box where the user chooses the machine then the RecSource and it lists the parts for that machine for that recsource. On this report I'd like to have 2 counts, one that counts the records on the report, this one I have no problem with. The other count I'd like to see is the total number of parts for that machine no matter what the recsource is. Can this be done?
    Thanks,
    Deb

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Need Help with Report Calculations (2000)

    You can use the DCount function. Its general form in the control source of a text box is

    =DCount("[NameOfField]", "[NameOfTableOrQuery]", "WhereCondition")

    If you need more help, please provide more information where the information about all parts for a specific machine is stored.

  3. #3
    4 Star Lounger
    Join Date
    Oct 2002
    Location
    Sayre, Pennsylvania, USA
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Need Help with Report Calculations (2000)

    Thanks Hans,
    I've tried the following and I am getting an error. =DCount("[lngPartsID]","[qryPartsStatusUnion]","[strMaterialJON]=[cboDPLSelectReport]"). I'm assuming that my syntax for the condition is wrong. strMaterialJON is part of the query and the cboDPLSelectReport is the combo box on the form that the user selects before they view the report.
    Thanks,
    Deb

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Need Help with Report Calculations (2000)

    You have to refer to a combo box on a form as [Forms]![NameOfTheForm]![cboDPLSelectReport]. The form must still be open.

  5. #5
    4 Star Lounger
    Join Date
    Oct 2002
    Location
    Sayre, Pennsylvania, USA
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Need Help with Report Calculations (2000)

    Thanks Hans, how soon we forget the little things. That did it. Thanks a ton. Deb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •