Results 1 to 4 of 4
  1. #1
    karmaimages is offline Novice
    Windows 7 Access 2003
    Join Date
    Nov 2009
    Posts
    14

    Count Query

    Hi,

    I have a table called DWP_Data_Backend - New form called "Stats" -



    In the table i have various fields - one called Surname - I want to just display a field in say a text box that counts the total number of records in table DWP_Data_Backend that have data entered. Is there an easy way to do this, I can't seem to work out how to create a query to do this?

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    For a query the sql would be

    Code:
    Select  count(*) from DWP_Data_Backend
    If you are working with a form, you may want to investigate Dcount

    Good luck.

  3. #3
    karmaimages is offline Novice
    Windows 7 Access 2003
    Join Date
    Nov 2009
    Posts
    14
    Quote Originally Posted by orange View Post
    For a query the sql would be

    Code:
    Select  count(*) from DWP_Data_Backend
    If you are working with a form, you may want to investigate Dcount

    Good luck.
    Hi,

    If i enter
    Code:
    Select  count([Surname]) from DWP_Data_Backe
    in the expression builder it comes up with an error: The Syntax of the Subquery in This Expression is Incorrect

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    What subquery? You'll have to show us more info. Attach you database in zip format so readers can see what you are dealing with.

    You don't have a table called
    DWP_Data_Backe

    Cross Posted??
    http://www.utteraccess.com/forum/ind...ic=2034579&hl=
    Last edited by orange; 02-01-2016 at 04:48 PM.

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

Similar Threads

  1. Year Count and Month Count Same Query
    By NateSmith in forum Queries
    Replies: 1
    Last Post: 05-13-2015, 08:23 AM
  2. Replies: 2
    Last Post: 04-15-2014, 01:59 PM
  3. COUNT Group Count Records COUNT FUNCTION
    By PMCOFFEY in forum Access
    Replies: 9
    Last Post: 11-09-2012, 09:40 PM
  4. Replies: 7
    Last Post: 05-02-2012, 08:04 AM
  5. Max of Count Query
    By dssrun in forum Queries
    Replies: 4
    Last Post: 03-05-2012, 12:53 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