Results 1 to 6 of 6
  1. #1
    vCallNSPF is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Dec 2009
    Posts
    49

    Import a totals value

    i need to count the number of entries in a table and import it into a single cell in another table, any ideas?

  2. #2
    PianoMan64 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    29
    Normally this wouldn't be something that would be beat practices. You normally would have some value that would could be used to break it down to any unit of measurementthT you'd like. For example a datetime value. This way you can see how many records are created every hour or every day or every week as you would lke without the need to store the value. You can simply calculate it from a query and it will break it down for you.

    If this is what you're looking for,

    select count(*) as results from <tablename>
    where datefieldname between #startdate# to #enddate#

  3. #3
    vCallNSPF is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Dec 2009
    Posts
    49
    ill explain it in more detail before i attempt to use code (im not good at code haha)

    basically ive got tables for types of equipment such as 'displays' which is one table and 'pagers' which is another table

    ive then got another table for total equipment that has fields of 'number of pagers' and 'number of displays', instead of typing these numbers i want them imported by counting the entries from the other tables if thats possible

    is that how you understood it?

  4. #4
    PianoMan64 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    29
    Quote Originally Posted by vCallNSPF View Post
    ill explain it in more detail before i attempt to use code (im not good at code haha)

    basically ive got tables for types of equipment such as 'displays' which is one table and 'pagers' which is another table

    ive then got another table for total equipment that has fields of 'number of pagers' and 'number of displays', instead of typing these numbers i want them imported by counting the entries from the other tables if thats possible

    is that how you understood it?
    Hey vCallNSPF:

    Since i didn't have that level of understanding before, that kind of clears up the issue a little bit for me.

    If you have separate table of each type of equipment that you have, that's going to be a great deal of tables that you're going to have to count.

    the but example of how to count the number of records is:

    Code:
    SELECT COUNT(*) as Pagers
    FROM tablename
    that is the simplist.

    If you want to insert that into another table:

    Code:
    INSERT INTO TableNameThatHoldsCounts.FieldName
    SELECT COUNT(*)
    FROM TableNameToBeCounted
    These are queries that you can run to do what you're talking about.

    If you have any more questions, please let me know,

    Joe P.

  5. #5
    vCallNSPF is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Dec 2009
    Posts
    49

    Total values not being specific

    i have a query that shows the total entries in 4 different tables.

    eg.

    displays: 4
    repeaters: 6
    nodes: 3
    receivers: 2

    okay, now when ive set it up it only counts the highest number and puts that as the value for all four.

    so it will come up as

    displays: 6
    repeaters: 6
    nodes: 6
    receivers: 6

    because repeaters is the highest amount, how do i set it up this is displayed correctly

  6. #6
    vCallNSPF is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Dec 2009
    Posts
    49
    Solved

    For some reason you cant create a query that counts all the fields from several different tables because they get mixed up. (well i couldnt find a way)

    so i made a query for each of the counts and brought each of those into a report in the form of a subreport and that worked

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Query - using Max Totals with Criteria
    By mslieder in forum Access
    Replies: 1
    Last Post: 06-19-2013, 06:02 AM
  2. Expense Totals
    By Nosaj08 in forum Database Design
    Replies: 10
    Last Post: 05-06-2009, 11:35 AM
  3. Day of Week Totals
    By ddog171 in forum Queries
    Replies: 1
    Last Post: 03-18-2006, 07:01 PM
  4. query - totals
    By mslieder in forum Access
    Replies: 0
    Last Post: 02-22-2006, 06:11 PM
  5. pivot table totals
    By brian12pme in forum Forms
    Replies: 0
    Last Post: 12-07-2005, 03:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums