Results 1 to 3 of 3
  1. #1
    Woblypegs is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Feb 2015
    Posts
    1

    Red face Counting Multiple Dates in a single Field.

    Hi, I'm creating a database for my wife to use in her work, one of the fields is dates visited and the user should enter "00/00/0000, 11/11/1111, 22/22/2222, 33/33/3333" in this format. The field is a large text format because there could be anything from 1 date to hundreds. What I need to be able to do is enter 2 dates and have access return how many dates exist between those 2 date values. eg It will pop up a box asking for start date and then another asking for end date and then it has to return the count total of how many dates exist between those two date values. I don't know VB and have had only basic training in Java and C# none of which involved Access. The only way I can think of doing it is to have access count the number of commas within the date field required but I don't know the formula required assuming it can even be done. I hope this isn't as confusing to you as it looks to me. Many thanks for any help offered.



    Wobly

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    This is not a normalized structure; it violates 1st normal form. See http://www.studytonight.com/dbms/dat...malization.php

    The field is a large text format because there could be anything from 1 date to hundreds
    If you have multiple dates for one field, consider using another table. Much, much easier to be able to count using a query or VBA.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    As Steve has said, your structure is not normalized. You will be in continuous "workaround mode" if you don't correct this basic flaw.
    You need to research database principles and design. Getting a clear description of your business requirement, and ensuring that your tables and design meets the requirement is key to a successful database application.

    Access has a date/time data type which you should use for Dates.

    You really need to work through some tutorials regarding design.
    Here are a few links that will help you:
    don database principles
    http://www.rogersaccesslibrary.com/T...lationship.zip

    Good luck with your database project.

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

Similar Threads

  1. Counting with multiple criteria in a field
    By pfunk in forum Queries
    Replies: 10
    Last Post: 08-13-2013, 11:45 AM
  2. Multiple choice in a single field
    By fabads in forum Access
    Replies: 6
    Last Post: 05-21-2013, 11:45 AM
  3. Counting fields in a single record
    By Racingrl in forum Queries
    Replies: 2
    Last Post: 06-11-2012, 10:52 AM
  4. Replies: 3
    Last Post: 02-14-2012, 09:43 AM
  5. Replies: 4
    Last Post: 10-08-2011, 06:31 AM

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